After learning vb.net found that the vb.net and C # Grammar main differences in two parts, the two parts straightened out, then the ease of doing it. The comparison is summarized as follows:
I. Entity PARTS
(Compared to VB, in C # and vb.net, the use of entities is very innovative, as the first comparison rendered)
C # entity: The syntax format is
Way public int ID { get {return ID;} set {ID = value;} } Way public int ID {get; set;}
Vb. NET entity : The syntax format is
Private Stucardid As String ' defines static properties public property CardID () As String Get Return stucardid ' Function: Gets the property value end Get set (value as String) Stucardid = value ' function: Set property value End Set End properties
Second, method (function)
C # Method: The syntax format is
Syntax: Access limiter return value type method name (argument [instance of entity]) public void Modify (Login.Model.UserInfo user) { //method body
VB. NET method: The syntax format is
' Syntax: Access restriction function keyword function name (parameter [ByVal entity object instance]) as return value type public Function Userlogon (ByVal User as entity.logonentity) as ENTITY.L Ogonentity Dim user1 as New entity.logonentity ' method body Return user1 End Function
for the new knowledge, the new environment, the difficulties and hardships of all, all have feelings. To do such a simple summary, for the time a long, is sure to forget, now the difference between the syntax is condensed into small packets. When needed, open at any time, reduce the burden of memory.
Vb. NET vs C # syntax differences Show