Archive for the 'C#' Category

Custom application error tracking through global.asax file

Posted on October 22 2009 by Sachin Jain

Custom application error tracking through global.asax file. Here you can track querystrings, post data and whole exception message with url

Naming Conventions and Standards – C#

Posted on October 20 2009 by Sachin Jain

1) Use Pascal casing for type and method names and constants:
public class YourClass
{
const int ConstantVariable = 100;
public YourMethod( )
{}
}

2) Use camel casing for local variable names and method arguments. Use p prefix for parameterized vairables:
int intNumber;
void MyMethod(int pintNumber)
{}

Generate Paging – Custom function

Posted on October 20 2009 by Sachin Jain

Here it goes

private int mstrPageSize = 1;
private int mstrTotalRecords = 1;
private int mstrCurrentPage = 1;

public int PageSize
{
get
{
return mstrPageSize;
}

Reading event log – Only exception part

Posted on October 20 2009 by Sachin Jain

Here is the few line code

try
{
int intCount = 1;
EventLog EventLog1 = new EventLog();
EventLog1.Log = “Application”

Difference between interface and abstract classes

Posted on October 15 2009 by Sachin Jain

Following are the 6 differences between abstract classes and interfaces :-
1) A class can implement as many interfaces, but an subclass at most one abstract class.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Powered by Sachin Jain