Working around VB .NET

Do you know how amazing VB .NET is?  When i was programming in C it took me so much time to google and figure out solution.  VB .NET was the other way round!  Google “what do you want” + “in vb .net” and you got what you want instantly.

I wanted to check for the file extension so i googled and i got the result and towards my amazement the outcome came out pretty well!

Back when i was programming in C i have to use

if(strstr(filename, ".exe") != 0)

or probably you’ll use this!

if(filename[strlen(filename) - 1] != 'e' &&
filename[strlen(filename) - 2] != 'x' &&
filename[strlen(filename) - 3] != 'e' &&
filename[strlen(filename) - 4] != '.')

but in VB .NET (oh the wonders in the world), you’ll just

if Path.GetExtension(filename) = ".exe"

damn it… how i wished i learnt VB .NET in depth! – Not. Well although VB .NET provides us with so much simplicity i still prefer C as it was my first language and the one i mastered well the most. However i’m learning VB .NET for the sake of its GUI 🙂 Big thanks to those that brought VB .NET to how it is today!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: