Knowledge Transfer

Sunday, December 21, 2008

ASP.Net Page LifeCycle ,LifeCycle


Here i am explain the asp.net page lifecycle.Please Click on the images for Enlarge....






Happy Coding
Uday.Adidham

Labels: , , ,

Wednesday, December 17, 2008

Using Params Keyword in C#.Net

Sometimes we may require a variable number of arguments to be passed to a function. For example we may require a sum function which calculates the total of the numbers passed to it no matter how many numbers are passed.

In C# we can use the Params keyword and pass variable no of arguments to a function. It's much like using ParamArray in VisualBasic language. The syntax of params arguments is:
params datatype[] argument name

Note that the argument passed using params argument should be an single dimension array also it should be the last argument in the argument list for the function.

The params parmeter can then be accessed as an normal array.

Example

class ParamsTest
{
static void Main()
{
System.Console.WriteLine(sum(2,3,4)); // Three Arguments Passed
System.Console.WriteLine(sum(10,20,30,40,50,60));//Six Arguments
}
static int sum(params int[] num)
{
int tot=0;
foreach(int i in num)
{
tot=tot+i;
}
return tot;
}
}

Happy coding,
Uday.Adidham

Labels: , , , , ,

Using Params Keyword in C#.Net

Sometimes we may require a variable number of arguments to be passed to a function. For example we may require a sum function which calculates the total of the numbers passed to it no matter how many numbers are passed.

In C# we can use the Params keyword and pass variable no of arguments to a function. It's much like using ParamArray in VisualBasic language. The syntax of params arguments is:
params datatype[] argument name

Note that the argument passed using params argument should be an single dimension array also it should be the last argument in the argument list for the function.

The params parmeter can then be accessed as an normal array.

Example

class ParamsTest
{
static void Main()
{
System.Console.WriteLine(sum(2,3,4)); // Three Arguments Passed
System.Console.WriteLine(sum(10,20,30,40,50,60));//Six Arguments
}
static int sum(params int[] num)
{
int tot=0;
foreach(int i in num)
{
tot=tot+i;
}
return tot;
}
}

Happy coding,
Uday.Adidham

Labels: , , , , ,

Thursday, December 11, 2008

How can i include both C# and vb.net classes in same

1)How can i include both C# and vb.net classes in same
solution?

It is possible,In app-Code folder create sub folders
named VB,CS(as you like) and clreate .vb class files in the
folder named VB and .cs class files in the CS folder.
Step 2:
Go to web.config file and mention the following

in web.config file ....

< compilation debug="false" >
< codesubdirectories >
< add directoryname="VB" >
< add directoryname="CS" >



-------------------
HappyCoding
Uday

Labels: , , ,

How can i include both C# and vb.net classes in same

1)How can i include both C# and vb.net classes in same
solution?

It is possible,In app-Code folder create sub folders
named VB,CS(as you like) and clreate .vb class files in the
folder named VB and .cs class files in the CS folder.
Step 2:
Go to web.config file and mention the following







-------------------

Labels: , , ,