“String” ile “string” Arasındaki Fark string ifadesi System.String sınıfını çağırmak için kullandığımız bir aliasdır. Kısacası ; string sözcüğünün System.String farkı yoktur.
“String” ile “string” Arasındaki Fark
string ifadesi System.String sınıfını çağırmak için kullandığımız bir aliasdır. Kısacası ;
string sözcüğünün System.String farkı yoktur.
1 2 | string text = “İstanbul”; String text = “İstanbul”; |
İfadelerinin birbirinden hiçbir farkı yoktur. Execute zamanında, iki ifade de aynı kodu compile eder. C# için diğer sınıflar ve onların aliasları :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | object = System.Object; string = System.String; bool = System.Boolean; byte = System.Byte; sbyte = System.SByte; short = System.Int16; ushort = System.UInt16; int = System.Int32; uint = System.UInt32; long = System.Int64; ulong = System.UInt64; float = System.Single; double = System.Double; decimal = System.Decimal; char = System.Char; |