system.array Questions

13

Solved

I have the following code: // Obtain the string names of all the elements within myEnum String[] names = Enum.GetNames( typeof( myEnum ) ); // Obtain the values of all the elements within myEnum...
Suburbanize asked 27/1, 2009 at 9:11

5

Solved

I have a System.Array that I need to convert to string[]. Is there a better way to do this than just looping through the array, calling ToString on each element, and saving to a string[]? The probl...
Letaletch asked 28/12, 2009 at 18:7

7

Solved

This code: int[] myArr = { 1, 2 }; myArr.Add(3); throws the following error on Build: error CS1061: 'System.Array' does not contain a definition for 'Add' and no extension method 'Add' accepting ...
Infamous asked 30/6, 2016 at 8:34

1

I would like to add (arithmetics) two large System.Arrays element-wise in IronPython and store the result in the first array like this: for i in range(0:ArrA.Count) : arrA.SetValue(i, arrA.GetVa...
Willful asked 28/1, 2015 at 14:23

6

Solved

I am learning c# and trying to understand the "type oriented" aspects of it. So the other day I needed to receive an System.Array object from a method. Then I tried to work with it's individual ob...
Antons asked 30/12, 2011 at 14:51

1

I guess this is more of a framework design question. I recently wondered why most of the methods in System.Array are static. My gut reaction always is to use e.g. IndexOf(object) on the Array...
Indicia asked 23/5, 2013 at 12:1

2

Solved

I want to return an array of strings from an MVC function via a jQuery AJAX call. My client side code is: function get_categories() { var url = "/Profile/GetCharacters"; $.post(url, function (d...
Tabu asked 10/2, 2012 at 11:59

3

Solved

System.Array serves as the base class for all arrays in the Common Language Runtime (CLR). According to this article: For each concrete array type, [the] runtime adds three special methods: Get/...
Porush asked 31/3, 2010 at 19:9
1

© 2022 - 2024 — McMap. All rights reserved.