About 214,000 results
Open links in new tab
  1. C# Creating an array of arrays - Stack Overflow

    How do I create an empty array of arrays with a fixed size? The individual arrays stored within the array may vary, but there will be a fixed amount of arrays within the master array.

  2. How to declare an array of objects in C# - Stack Overflow

    0 The reason this is happening is because initializing an array does not initialize each element in that array. You need to first set houses[0] = new GameObject() and then it will work.

  3. How do I initialize an empty array in C#? - Stack Overflow

    Jan 4, 2012 · Is it possible to create an empty array without specifying the size? For example, I created: String[] a = new String[5]; Can we create the above string array without the size?

  4. How to populate/instantiate a C# array with a single value?

    I know that instantiated arrays of value types in C# are automatically populated with the default value of the type (e.g. false for bool, 0 for int, etc.). Is there a way to auto-populate an array ...

  5. c# - Declare a const array - Stack Overflow

    When you declare an array, it is a pointer to a segment of memory that contains the array. It is very simple in that it is just an address, with no complex logic controlling if it is readable or …

  6. .net - printing all contents of array in C# - Stack Overflow

    I am trying to print out the contents of an array after invoking some methods which alter it, in Java I use: System.out.print(Arrays.toString(alg.id)); how do I do this in c#?

  7. Can you define an array with a pre-specified size in C#?

    7 Length is a property of an array instance, not part of the type. An array variable merely contains a pointer to an array. Therefore fields, properties, and other variable declarations are agnostic …

  8. How do I convert an Array to a List<object> in C#?

    Feb 7, 2011 · Everything everyone is saying is correct so, int[] aArray = {1,2,3}; List<int> list = aArray.OfType<int> ().ToList(); would turn aArray into a list, list. However the biggest thing that …

  9. How to Fill an array from user input C#? - Stack Overflow

    Oct 23, 2008 · What would be the best way to fill an array from user input? Would a solution be showing a prompt message and then get the values from from the user?

  10. C# Copy Array by Value - Stack Overflow

    I wanted to do the same thing: make a copy of an array by value for things like sorting so that I could later reinitialize another temp array with the original source array.