精華區beta TTU-I90B 關於我們 聯絡資訊
C# string and String As I'm digging further into my C# for VB6 programmers talk that I am preparing for Code Camp and also DevConnections, I noticed something funny - that case- sensitive C# doesn't seem to care if you use String or string - while it cares plenty if you try to use "Int" or "Bool", etc. I realized though that it is really because string is the C# type and System.S tring is the .NET type, so they both are okay. So byte/Byte are both okay but you can't get away with int/Int32 or bool/Boolean. The funny thing is that whe n I am coding in VB, I try to use the framework types. I always use Int32, nev er Integer. But I was trying to be a cool C# coder, so I was using the C# type s instead. Go figure! Actually in VB, Integer is more work than Int32, but in C# int is faster than Int32. So that's probably my good excuse, eh? Anyway, th ese seem like silly things, but definitely will make a VB coder stop and think for a minute which is why I'm doing my best to try to save them a few steps! This talk is almost just as easily C# for VB.NET programmers, except that sinc e there were syntax changes from VB6 to VB.NET, I will be incorporating the VB 6 perspective as well. http://www.AcehAid.org