Declaring an array of linked list in C#
How do I declare an array of some class in C#? I wonder if it is even allowed or possible.
I got the compile error message "Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)" when I tried to declare an array of linked lists.
public LinkedList<LevelNode>[2] ExistingXMLList;
Also, if I wanted to create a small array of strings, isn't this the way:
string [2] inputdata;
You really need to go look at MSDN for arrays. http://msdn.microsoft.com/en-us/libr...53(VS.71).aspx http://www.lmgtfy.com/?q=C%23+tutori...UTF-8&oe=UTF-8
Let me suggest that right now you just STOP, think, and make a choice about your future. - Are you going to be the person who asks everyone for the answer and do your research for you?
- Or are you going to be someone who actively controls their education and marketable job skills?
- Are you going to be the so-so coder that gets dumped the crap jobs that better skilled people don't want?
- Or are you going to CHOOSE to excel at what you do and get whatever good gig you want?
- Are you going to be the person to cries "I don't know, someone tell me the answer"?
- Or are you going to be the person who says "Everything I learn is another dollar I earn"?
Do you want to be common or exceptional? It's entirely your choice, and you make that choice by making an effort in your education and work ethic.
While you are making that decision, let me give you a hint:
My programming skills sent me to these places at the company expense: Chitzen Itza Australia New Zealand, Singapore, Malaysia, Fiji, Dubai, Finland, Beruit Panaramic Alaska
...And not because I was the guy too lazy to google. Or because I was the guy that would rather watch "My name is Earl" and "Survivor 15" instead of spending my own free time at night reading programming text books.
1 2209
You really need to go look at MSDN for arrays. http://msdn.microsoft.com/en-us/libr...53(VS.71).aspx http://www.lmgtfy.com/?q=C%23+tutori...UTF-8&oe=UTF-8
Let me suggest that right now you just STOP, think, and make a choice about your future. - Are you going to be the person who asks everyone for the answer and do your research for you?
- Or are you going to be someone who actively controls their education and marketable job skills?
- Are you going to be the so-so coder that gets dumped the crap jobs that better skilled people don't want?
- Or are you going to CHOOSE to excel at what you do and get whatever good gig you want?
- Are you going to be the person to cries "I don't know, someone tell me the answer"?
- Or are you going to be the person who says "Everything I learn is another dollar I earn"?
Do you want to be common or exceptional? It's entirely your choice, and you make that choice by making an effort in your education and work ethic.
While you are making that decision, let me give you a hint:
My programming skills sent me to these places at the company expense: Chitzen Itza Australia New Zealand, Singapore, Malaysia, Fiji, Dubai, Finland, Beruit Panaramic Alaska
...And not because I was the guy too lazy to google. Or because I was the guy that would rather watch "My name is Earl" and "Survivor 15" instead of spending my own free time at night reading programming text books.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Friday |
last post by:
Sorry if this is the wrong group. I tried to find the one I thought
would be most relevant.
I'm an old PHP guy, who knows little about asp and NOTHING about
asp.net, but need to learn at least...
|
by: Fabian Wauthier |
last post by:
Hi list,
I am trying to dynamically grow a 2 dimensional array (Atom ***Screen) of
pointers to a struct Atom (i.e. the head of a linked list). I am not
sure if this is the right way to do it:
...
|
by: Carson |
last post by:
Hi ,
Is there a very efficient way to set a double array to 0 ?
(I have tried memset, but the result doesn't look correct.)
Carson
|
by: Steve Lambert |
last post by:
Hi,
I'd be grateful if someone could clarify this for me. In the linked list
structure my intention is to declare an array of length 3 containing
pointers to node
eg. Node *Iterators
The...
|
by: simkn |
last post by:
Hello,
I'm writing a function that updates an array. That is, given an
array, change each element.
The trick is this: I can't change any elements until I've processed
the entire array. For...
|
by: Tom Jastrzebski |
last post by:
Hello,
I was just testing VB.Net on Framework.Net 2.0 performance when I run into
the this problem.
This trivial code attached below executed hundreds, if not thousand times
faster in VB 6.0...
|
by: skumar434 |
last post by:
Hi everybody,
I am faceing problem while assigning the memory dynamically to a array
of structures .
Suppose I have a structure
typedef struct hom_id{
int32_t nod_de;
int32_t hom_id;
|
by: =?Utf-8?B?RWl0YW4=?= |
last post by:
Hello,
I am declaring an element like this:
public static List<myListElementmyList = new List<myListElement>();
I would like to declare an array of this myList.
How would I modify the...
|
by: AZRebelCowgirl73 |
last post by:
This is what I have so far:
My program!
import java.util.*;
import java.lang.*;
import java.io.*;
import ch06.lists.*;
public class UIandDB {
|
by: pereges |
last post by:
Hi, I am wondering which of the two data structures (link list or
array) would be better in my situation. I have to create a list of
rays for my ray tracing program.
the data structure of ray...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |