Click here to Skip to main content
13,351,465 members (44,583 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 5:28am
vivek511 30-Jan-13 10:34am
very nice! thanks for accept Answer
PIEBALDconsult 30-Jan-13 10:52am
If possible, use a List or other collection rather than array.
Kishor Deshpande 30-Jan-13 11:35am
Hmm, List would be a better choice :)
Rate this: bad
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";
Rate this: bad
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"};

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2018
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