[dba-VB] C#?

Ron Allen chizotz at mchsi.com
Tue May 16 10:15:22 CDT 2006


Hi Kath,

I switched about 3 or 4 years ago. The learning curve was actually pretty 
shallow, I thought. Then again, I had a bit of prior experience with C and 
C++, so the syntax was reasonably familiar to me. The surface differences 
between C# and VB make them look pretty different, but once you get past that 
they are actually very similar to program in. C# uses curly braces to set off 
blocks of code. Also, every statement is terminated with a semicolon. So at 
first you think you're typing too much, but I've found, after coding in C# for 
awhile, that I like how everything is neatly set off. 

Here's an example that doesn't do anything meaningful...


VB

    Dim i As Int32
    Dim s As String

    For i = 1 To 10
        s = Str(s)
    Next

C#

    string s;
			
    for(int i = 1; i <= 10; i++)
    {
        s = i.ToString();
    }

These two blocks of code do exactly the same thing. They look different at 
first glance, but when you look closer they're very similar.

If you put the effort into learning the syntax, you'll find that everything 
else you know from VB transfers pretty well to C#.

Hope that helps :)

Ron






> Has anyone made the change from vba to C#? Just wondering how big the learning 
> curve is......
> 
> ______________________________________
> Kath Pelletti
> Software Design and Solutions Pty Ltd.
> Ph: 9505-6714
> Fax: 9505-6430
> Email: KP at SDSOnline.net
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 



More information about the dba-VB mailing list