See the below example to understand the difference between post incrementation and pre incrementation.
int
x = 10;int z;//First assigns value of x (10) to z and then x value incremented to 11.
z=x++;MessageBox.Show(“Post Incement of x=” + z);int y = 20;int a;
//First increments value of y to (21) and assigns 21 to as.a=++y;
MessageBox.Show(“Pre incrementor Y=”+a);













I have a small doubt on return types.suppose if we want to return two values i.e int and string from same method.what is the solution for this.
I don’t think one can return more than one value from a function or any thing. But one can achieve it through returning a structure. Or same can be achieved by call by ref and update their values.
You can always return an object or object array which contains more than one value.
For Best Android Training Click Android Training in Bangalore
Ya, in that way one can return.
hi,
i want to know that how can i get system update date time? except system.DateTime.now; because it is giving only current time, but not updating.
hi,
i want to know that “can i write more than one main method in a single program in c#(console application)?”.
When ever you refresh Page the time will be automatically updated by the server side C# code.
To get update of the time automatically in your Client( Browser every second then you need to use
JavaScript date time methods.)