Tuesday, August 6, 2013

how to do type casting in c#

frequently we need casting in c#. type casting is one of them as like below

private void findtotalstudent()
{
int count=(int)gettotalstudent()
}

private int gettotalstudent()
 {
int totalcount=0

// find out total count from  database

return totalcount;
}

No comments: