Ilist Introductions and simple code
;IEnumerable, IEnumerable
using System.Collections.Generic;
The System.Collections.Generic namespace contains interfaces and classes that define generic collections, which allow users to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections.
Here is a simple code which could help better understand the IList interface
first create a UserInfo class
public class UserInfo
{
private string _userName = string.Empty;
private string _password = string.Empty;
public UserInfo()
{
//
// TODO: Add constructor logic here
//
}
public UserInfo(string userName, string password)
{
this._userName = userName;
this._password = password;
}
public string UserName
{
get { return _userName;}
}
public string Password
{
get { return _password; }
}
}


Leave a Reply