C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and approved by Ecma and ISO.
C# was developed by Anders Hejlsberg and his team during the development of the .Net framework.
C# is designed for the Common Language Infrastructure (CLI). The CLI consists of executable code and a runtime environment that allows the use of a variety of high-level languages on different computer platforms and architectures.
C# method syntax
One method is to group some related statements together into a block of statements used to perform a task. Every C# program has at least one class with a Main method.
To use a method, you need to:
Define the method
Call the method
C# method example
class NumberManipulator{ public int FindMax(int num1, int num2) { /* 局部变量声明 */ int result; if (num1 > num2) result = num1; else result = num2; return result; } ...}