In this web programming tutorial we will learn that how we can declare methods in asp.net using c#.
When you declare a method in C#, the first part of the declaration specifies the data type
of the return value, and the second part indicates the method name. If your method doesn’t
return any information, you should use the void keyword instead of a data type at the beginning
of the declaration.
// This method doesn't return any information.
When you declare a method in C#, the first part of the declaration specifies the data type
of the return value, and the second part indicates the method name. If your method doesn’t
return any information, you should use the void keyword instead of a data type at the beginning
of the declaration.
// This method doesn't return any information.
void MyMethodNoReturnedData() { // Code goes here. }
No comments:
Post a Comment