Monday, July 9, 2007

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

#region Private Members
private int _intUserLevelID;
private Guid _guidUserLevelGUID;
private string _strDescription;
private int _intCreatedBy;
private DateTime _dtCreatedDate;
private int _intLastModifiedBy;
private DateTime _dtLastModifiedDate;
#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; }



Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Search This Blog
About Me
My Photo

Full Stack Developer, Blogger, Microsoft Mvp, Mentor, Lifelong learner, 12+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC/Core, C#, Angular,Vue.js and node.js
Subscribe to my blog


My You tube channel- Please Subscribe
Youtube Video Playlist
My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews