blah blah blah is here! blah blah » Close

0
votes
2 answers

C# textbox MultiLine problem

I'm having a problem with MultiLine in Textbox as i stumbled upon this problem... I simply cant figure out how to sum numbers which are separated by newline (/r/n) and then divide them with the number of them in array so that I can get thei ...

0
votes
1 answers

How to shortly copy a jagged part of an array into a 1D array?

How to shortly copy a jagged part of a double array into a 1D array? I have "double" A[][,] and I want to copy all elements in A[1][i,2] into another 1D double array B[] : i.e put this elements of A into X A[1][0,2]-->X ...

0
votes
1 answers

how to get collection (not element) size of an array.

Like this for instance. [code] string[,] siblings = new string[,] { {"Mike","Amy"}, {"Mary","Albert"} }; int length = siblings.Length; // this would give me a 4. I want a 2 because there are 2 se ...

0
votes
4 answers

How to use a string as a name of a variable in c#

Hi mates, How to use a string , to be a variable name, for example suppose X="WELL" then I want to have an array with this name -> double [] WELL = new double[10]; more specifically I want to create a set of arraies, in ...

0
votes
1 answers

I need help with an array that I need to use in C#. Please help.

I have been asked to create a program that open a .txt file that contains customer names and licence fee's to be paid in %. I have managed to get the program to open the .txt file and now I need to create an array that asks the user for the ...

0
votes
3 answers

better way to search a list of classes?

Suppose I have a class. [code]public class MyClass { public int ID; public string UniqueIdentifier; public bool Enable; ... // more public vars public MyClass Parse(string parseFrom) { ... // pars ...

0
votes
1 answers

How to store dinamicly into array?

q12
349

[code] string[] a, b, c; int contor = 0; private void textBox1_TextChanged(object sender, EventArgs e) { //allways, instantiating create null's(erasing everything from it); //[b]How t ...

0
votes
0 answers

C# Array Excel Spreadsheet

How do I import an Excel Spreadsheet into C# as an array in a way that can be ported to both PC and mac. Using the GTK# Library?

1
votes
1 answers

C# Array Import

How can I import an excel spreadsheet like in this tutorial (http://www.davidhayden.com/blog/dave/archive/2006/05/26/2973.aspx) into a C# Array. Thanks, Theo

0
votes
1 answers

A text-file-array question

Hi all, I've got a few questions. 1st. How do I save a text file into an array so that the lines on the text file are different numbers in the array. 2nd. Can I use a random int to select which array value to use and display? 3rd. Can I ...

0
votes
0 answers

C# Fourms App - Array Display

In the C# Fourms application toolbox IS their any type of table in which I could display a string matrix (array) that would have scroll bars and work regardless of how many entries I have. IT would be like an excel spreadsheet except I can ...

1
votes
2 answers

C Sharp Combination

Hi everyone I'm trying to create all possible combinations without repetitions. I need to create 3 numbers with values from 1-10 with no repetitions. Ex: 1-2-3 1-3-4 1-2-4 1-3-5 2-3-5 and so on..... I need a ...

0
votes
2 answers

Index was outside the bounds of the array.

Hi all, i'm new to C#, and as i try to debug the following code, i take the error : "Index was outside the bounds of the array. " in line : Console.WriteLine(args[0]); . The source code is the following: using System; using ...

0
votes
1 answers

Search/replace/remove/etc in an array with multiple items?

Is it possible to accomplish something like this? [code] byte[] bytes = new byte[] { 0x00, 0x01, 0x01, 0x05, 0xa0, 0xa1, 0x01, 0x01, 0x00, 0xa0, 0xa1, 0xa0, 0xa4, 0x00 }; // ...

0
votes
1 answers

Accessing array from multiple threads

Let's say I have two arrays: int[] array1 = new int[2000000]; int[] array2 = new int[2000000]; I stick some values into the arrays and then want to add the contents of array2 to array1 like so: for(int i = 0; i < 2000000; ++i) ...

Feedback