how to use array in C# [Resolved]

Posted by S.Preeti under C# on 9/30/2012 | Points: 10 | Views : 795 | Status : [Member] | Replies : 6
use of array plz explain with an example.




Responses

Posted by: Ranjeet_8 on: 9/30/2012 [Member] [MVP] Gold | Points: 50

Up
0
Down

Resolved
try this code.

using System;
using System.Collections;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string[] Erec = new string[2];
Erec[0] = "ASD";
Erec[1] = "FGH";
Erec[2] = "JKL";
Erec[3] = "QWE";
foreach(string str in Erec)
Console.WriteLine(str);
Console.ReadLine();
}
}
}


S.Preeti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/30/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

refer this

http://www.dotnetfunda.com/codes/code3294-how-to-bind-array-object-to-gridview.aspx


Mark as Answer if its helpful to you

S.Preeti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/30/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
Please mark as answer if it helpful to you.

Mark as Answer if its helpful to you

S.Preeti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: S.Preeti on: 9/30/2012 [Member] Starter | Points: 25

Up
0
Down
Plz try to explain.. dont post link only.

@Ranjeet_8
Thnks

S.Preeti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 9/30/2012 [Member] Starter | Points: 25

Up
0
Down
good job raj

Thanks & Regards
Hari

S.Preeti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 10/6/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi


client side

<asp:GridView ID="rd1" runat="server" >

</asp:GridView>



Server Side

ArrayList arr = new ArrayList();

arr.Add("Jesus");

arr.Add("Jehovah Jireh");

arr.Add("Jehovah Ruffa");



rd1.DataSource = arr;

rd1.DataBind();



Mark as Answer if its helpful to you

S.Preeti, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response