Home > Net >  How do you use the collection in c #? With loop output statements
How do you use the collection in c #? With loop output statements

Time:11-27

How do you use the collection in c #? With loop output statements

CodePudding user response:

You know what?

CodePudding user response:

List The list - new List (a);
List. The Add (1);
List. Add (2);
List. Add (3);
Foreach (int I in the list)
Console. WriteLine (I);

CodePudding user response:

Questions can clear? This who is willing to answer your questions, the who know what you mean, how to use? Have not learned. C #?

CodePudding user response:

What do you mean can elaborate on it?

CodePudding user response:

Var strList=new List {how are you? "" , "hello!" , "you are so handsome!" , "good good!" }
StrList. ForEach (STR=& gt; Console. WriteLine (STR));

CodePudding user response:

 


Var strList=new List {how are you? "" , "hello!" , "you are so handsome!" , "good good!" }
StrList. ForEach (STR=& gt; Console. WriteLine (STR));

That's a good written, praise a!
  • Related