在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
public struct MyStruct { public string s; public int length; public static implicit operator MyStruct(string value) { return new MyStruct() { s = value, length = value.Length }; } } Example: MyStruct myStruct = "Lol"; Console.WriteLine(myStruct.s); Console.WriteLine(myStruct.length); Output: Lol 3
|
请发表评论