Hi SUJAYS ,
Pls refer below code
C#
protected void Page_Load(object sender, EventArgs e)
{
ArrayList arrList = new ArrayList();
arrList.Add(921);
arrList.Add(DateTime.Now);
arrList.Add("Mudassar Khan");
if (arrList.Count > 0)
{
Response.Write("Last Item : " + arrList[arrList.Count - 1]);
}
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim arrList As ArrayList = New ArrayList()
arrList.Add(921)
arrList.Add(DateTime.Now)
arrList.Add("Mudassar Khan")
If arrList.Count > 0 Then
Response.Write("Last Item : " & arrList(arrList.Count - 1))
End If
End Sub
Output
Last Item : Mudassar Khan