Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Dear All
 
I am a bigneer programmer i have no idia to difine array in c# , kindly help me
 
thanks in advance
Posted 30-Jan-13 4:28am
Comments
vivek511 at 30-Jan-13 10:34am
   
very nice! thanks for accept Answer
PIEBALDconsult at 30-Jan-13 10:52am
   
If possible, use a List or other collection rather than array.
Kishor Deshpande at 30-Jan-13 11:35am
   
Hmm, List would be a better choice :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Please pick a book or search Google/Online material before asking such basic questions.
Start from here:
MSDN: Arrays Tutorial[^]
C# String Arrays[^]
 
Various ways:
// various ways
string[] arr1 = new string[] { "one", "two", "three" };
 
string[] arr2 = { "one", "two", "three" };
 
var arr3 = new string[] { "one", "two", "three" };
 
string[] arr4 = new string[3];
arr4[0] = "one";
arr4[1] = "two";
arr4[2] = "three";
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Dear Gourav
 
try it:
string[] ano={"A","B","C","D","E","F","G","H","I","J"};
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 686
1 OriginalGriff 385
2 CPallini 240
3 PIEBALDconsult 150
4 Magic Wonder 131
0 OriginalGriff 5,795
1 Sergey Alexandrovich Kryukov 5,158
2 CPallini 4,740
3 George Jonsson 3,167
4 Gihan Liyanage 2,450


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100