C#.NET 2.0 Generics Class collection

C#.NET 2.0 provide great features with generics collection. Now you don't have to write code for the coding for adding,removing objects. It all contains by the generics colleciton. here the sample user level class

using System;
using System.Collections.Generic;




public class UserLevelCollection
:System.Collections.Generic.List<userlevelcollection>

{
#region Private Members
private int _intUserLevelID;
private Guid _guidUserLevelGUID;
private string _strDescription;
private int _intCreatedBy;
private DateTime _dtCreatedDate;
private int _intLastModifiedBy;
private DateTime _dtLastModifiedDate;
#endregion
#region Public Properties
public int UserLevelId
{
get { return _intUserLevelID;}
set { _intUserLevelID = value; }
}
public Guid UserLevelGUID
{
get { return _guidUserLevelGUID; }
set {_guidUserLevelGUID=value; }
}
public string Description
{
get { return _strDescription;}
set { _strDescription = value; }
}
public int CreatedBy
{
get { return _intCreatedBy; }
set { _intCreatedBy = value; }
}
public DateTime CreatedDate
{
get { return _dtCreatedDate; }
set { _dtCreatedDate = value; }
}
public int LastModifiedBy
{
get { return _intLastModifiedBy; }
set { _intLastModifiedBy = value; }
}
public DateTime LastModifiedDate
{
get { return _dtLastModifiedDate;}
set { _dtLastModifiedDate = value; }
}
#endregion

}
}

Comments

Popular posts from this blog

Creating PDF with ASP.Net MVC and RazorPDF

Horizontal and vertical scrollbar in HTML5 and CSS3

How to create Rest API(Web API) with ASP.NET Core 1.0