Why should "I" use C#

it's personnel preference. There's not much difference between the two, I started on vb.net but went over to the sharp side as I was having to do a lot of probability calculations which at the time C# was better at.

If you can do vb.net then C# isn't a big leap. It's all about OO :eek:

Check out Lutz Roeder's .Net Reflector. it's a mighty fine tool.
 
I think a more appropriate thread title would be:

"Why I should use Google"

Always one isn't there!! Get that joke in a cracker or saw the response somewhere else and been saving it for the appropriate moment?

Anyway...

Thanks for the responses over the last few hours.

stx666, how do you mean about the probability calculations? Any examples?
 
*You* should use C# because you're losing income because of not using it. What more needs to be said?
 
But I just don't see a practical advantage at the moment.
In terms of what you can achieve with the language then there is no real advantage. However, having C# in your toolbox as a marketable skill will increase the opportunities available to you where that particular language is important (rightly or wrongly) to the customer, as in this case. As a seasoned developer you'll have no trouble picking up C#, and there are plenty of books that teach C# from the perspective of a VB/VB.NET programmer.

I've had the opposite situation recently: my preference is to develop in C#, but a client wanted the code delivered in VB.NET so their resident VB hobbyist could make changes without needing me (sob). I'll sting 'em if they ever want me to fix his bugs though :D
 
I've had the opposite situation recently: my preference is to develop in C#, but a client wanted the code delivered in VB.NET so their resident VB hobbyist could make changes without needing me (sob). I'll sting 'em if they ever want me to fix his bugs though :D

THAT could be the answer then. Never thought of that! Maybe they have another coder who's C# efficient. The swines!!!! :p

And:
Mr Jack said:
*You* should use C# because you're losing income because of not using it. What more needs to be said?

You're right! Hence why I started this thread with an open mind and not to diss the language (like I usually do!).

Think I'll finish thse few jobs and take some time to learn it.

Thanks folks, 'really' appreciate the none-biased answers on this one, it's been really helpful.
 
You're right! Hence why I started this thread with an open mind and not to diss the language (like I usually do!).

Think I'll finish thse few jobs and take some time to learn it.

Thanks folks, 'really' appreciate the none-biased answers on this one, it's been really helpful.

If you're an experienced developer with good knowledge of the .NET framework you'll pick it up in no time.

The only thing I can really think of off the top of my head that is much different is the way VB hooks up event handlers with Handles and WithEvents compared with the C# way of just doing it explicitly with delegates.

Take a look at the C sharpener program I linked above to try converting a few VB.NET functions to C# so you can see the differences.

Also, here's a good link with the differences between the languages.
http://www.codeproject.com/dotnet/vbnet_c__difference.asp
 
C# might just be what the rest of their stuff is done in / that their developers currently know. There is nothing worse than one dll in one language and another in a different one. Makes maintaining the stuff a pain in the rear.

I'm pretty sure C# is the most popular of the .Net language so it makes sense for company to want to go with the flow. As pointed out, the languages compile down to very similar code / build on the same frameworks, so the differences are minimal.
 
THAT could be the answer then. Never thought of that! Maybe they have another coder who's C# efficient. The swines!!!! :p
That's the most probable reason. It seems to me that C# and VB.net are functionally equivalent so there's not really any other sensible reason that I can see for them to specifically want it written in C#.
 
Sorry, I'm bound by contract, but if you were taking into consideration the projected results of say a horse race that was taking place that day. Factoring in the favorites and the racing post favorites, past performance, distance, etc. Running that though an equation at least a 1/4 million times for each race for every race event that day in the UK and Ireland for various what if scenarios. The only way i could get the calculations faster was to go to C.

Historically the project was a real time (as close as possible) multi threaded client server back office trading system written in vb.net, and c# was used only in a few plug-ins for mathematical performance gain.

Generally the performance differences are minimal, in my case the pure quantity of calculations did have a knock on effect.

I would say you wouldn't need to take a week out to learn C# (if you choose to), couple of days at the most to get comfortable with it.

Good luck anyway
 
Historically the project was a real time (as close as possible) multi threaded client server back office trading system written in vb.net, and c# was used only in a few plug-ins for mathematical performance gain.

Generally the performance differences are minimal, in my case the pure quantity of calculations did have a knock on effect.

Given that C# and VB.NET both compile to the same IL instructions how is C# any quicker?
The only way I can see that would be possible is if you use unsafe code to do some pointer arithmetic.
 
Given that C# and VB.NET both compile to the same IL instructions how is C# any quicker?
The only way I can see that would be possible is if you use unsafe code to do some pointer arithmetic.

Vb.net and C# speeds do differ due to compiler efficency, when compiling to IL. In simple terms sometimes the route to objective is longer from vb.net to IL than c# to IL, and also the reverse is true.

Vb.net is a good language as is c#, just learn both and reap the rewards, having done both myself, I prefer c# due to the amount of help/tutorials on the net and that it's also case sensitive.
 
So, DJ_Jestar, let me give you an example then:

I've just finished a program in VB.Net than attaches into a CNC device and monitors parts scanned (via RFID), saves this unique identifer into a database, and continues until the entire manifest is complete, which then prints a packing note, retrieves the next incomplete job and continues.

So are you really saying that for me to learn:

COM Port reading
Dataset handling
Printing

Would take me an hour to learn? Or are we talking an hour per area?
Given all .NET platforms can read any of the above, no, it would take you less.

15 years experience and you can't see that?
 
Given all .NET platforms can read any of the above, no, it would take you less.

15 years experience and you can't see that?

I think you've proven in every post that your opinion is absolutely worthless. Sorry to be harsh, but it's fact. (15 years has shown me that those who know nothing tend to mumble about nothing)

Thanks anyway, you've had your skit, I've had mine, let's leave it there and do things more constructive in life.
 
Sorry, you don't get to have a "skit" then call it quits.

15 years experience and you can't see how trivial it is to learn a new syntax, let alone a new syntax to the same system (.NET)

Then you open a rant thread, and don't like it when someone (me) points out it's an utterly trivial topic for developers. I side tracked on the unsafe variables, I warrant you that, but the rest of my replies are hardly worthless. Why does it pain you so much to move from VB to C# when the base platform is just about identical?
 
I think you've proven in every post that your opinion is absolutely worthless. Sorry to be harsh, but it's fact. (15 years has shown me that those who know nothing tend to mumble about nothing)

Thanks anyway, you've had your skit, I've had mine, let's leave it there and do things more constructive in life.

I think you're misunderstanding how C# and VB.NET relate to eachother; you wouldn't have to learn the things you've listed as you already know them (you must do because you claimed to have used them from VB.NET). If you know how to do COM port reading, dataset handling, and printing in VB.NET, you know how to do it in C#. The only thing you have to learn is C#'s syntax and that's it
 
Last edited:
OK, let me continue then.

1) Your first reply was worthless. It attempted to be a skit, but failed miserably because you had the facts wrong. Other people knew what I meant, they answered it sensibly. Even some questioned your own comprehension of the question. Granted it could have been worded better, but the fact remains your answer was obnoxious and didn't help the question at hand. To me, it appeared as if you attempted to raise onto a little soapbox and protest as someones lack of understanding of something foreign to them.

2) By your OWN admission, and I quote, "I don't use C#, but my colleagues do." Stop there. I don't want to know. I don't want hearsay, I want answers from people who know what they are talking about. Again, fact is your professional opinion on something that you don't use is absolutely worthless to me (and anyone else that the thread may help).

3) Your answer of, and again I quote, "any of which would take less than an hour to learn, providing there is competence in other mediums." Really? So are you really saying, and choose your answer carefully, that YOU (someone who doesn't use C#) knows how long it will take someone to learn the basic fundamentals of a new language? Are you saying that my extensive knowledge of the programming fundamentals of VB.Net (Loops, events, classes, generics, serializations, interoperation, reflection, globalization, delegates, threadings [shall I go on?]) that I can learn the general syntax on handling all this WITHIN ONE HOUR - providing I'm, ahem, competent in other mediums?

Yes, I've found out that my simple:

[VB.Net]
Dim pVariable AS String = "My String"

is wrote as
[C#]
pVariable String = "My String";

I've picked that up quite well. But when I have to learn about the new syntax for loops (granted it's relatively easy), then we start to add in a bit more time for it to sink in.

When I start to add in file handling routines (and I'm not talking about ye olde dialog box, I'm talking down to the nitty gritty file handling events), then that's a little bit more to take on board.

Yes I accept that pVariable.ToString will work on VB.Net and C#, nothing much to learn there, but there's a whole world of difference between:

[VB.Net]
Dim pItem as StockItem = New StockItem
Dim ds as FileStream = New Filestream("StockItem.XML",FileMode.Open)
Dim xs as XmlSerializer = New XmlSerializer(GetType(StockItem))
pItem = CType(xs.Deserialize(fs), StockItem)
fs.Close()
Return pItem

and

[C#]
StockItem pItem = new StockItem();
FileStream fs = new FileStream("StockItem.XML",FileMode.Open);
XmlSerializer xs = new XmlSerializer(typeof(StockItem));
dsp=(StockItem)xs.Deserialize(fs);
fs.close();
return pItem;

Still say learning all this is gonna take me less than an hour? Or is my incompetence starting to show through? 15 years been a waste of my time?

4) Another quote - "Given all .NET platforms can read any of the above, no, it would take you less. 15 years experience and you can't see that?" See what? What the hell are you on about? O sorry, you're saying that all .Net platforms can read COM ports, Printers and dataset handling? Er, yes I guess you're right. Forgive my stupidity on that one. Or are you trying to impress me with your intelligence and know that the ending syntax will probably be the same, i.e., .Open()

Now, follow me to example land and let me show you something else I've picked up:

[VB.NET]
Dim pProcesses() As Process = Nothing
pProcesses= Process.GetProcessByName("explorer","machinename")
For Each pProcess As Process In pProcesses
Console.WriteLine(pProcess.ProcessName)
Next

[C#]
Process[] pProcesses =null;
pProcesses =Process.GetProcessByName("explorer","machinename");
foreach (Process ThisProcess in pProcesses)
{
Console.WriteLine(ThisProcess.ProcessName);
}

Little bit more to learn there. You agree? Thought not. Well there is for me, y'see for one I've never used a null in programming. Sure I've used it in SQL, and I know what a null is (took me 14 years to learn, but hey ho), and those funny square brackets. What are those? Quick flick in the book reveals it's an array.

foreach, that's something new. Different to VB.Net, but, yes, I understand that now (tick tock tick tock, there's the hour countdown again). Curly braces, hey they look familar, I've saved a bit of time on this magic hour by knowing about curly braces.

Yes I can see perfectly well that the commands are the same, they are, after all, .Net commands which are common throughout the framework. But the syntax to acquire the results DOES differ, and in my mind, someone who hasn't touched the language before, it's new to me.

Getting bored yet? 'Cos I sure as hell am!

Anyway...

Finally:

5) Can't be bothered to quote it all, but the "15 years experience and you can't see how trivial it is to learn a new syntax, let alone a new syntax to the same system (.NET)" again bothers me slightly.

That's EVERY post (bar one) where this "15 years experience" thing has cropped up. Why? Should I know a new language because I've had 15 years experience in VB?
I've had 36 years experience in knowing what milk tastes like, should I have found out what cranberry juice tastes like after 15? I'm confused?

Let me remind you of one important thing here. I work. I work hard, I work long and I LURVE what I do. If you want to be pedantic, I've been developing for almost 21 years now so I think I can consider myself as a bit of an old hat when it comes to developing software. But as someone said in this thread (won't mention their name as it's not fair to bring them into this), but by NOT knowing the language, it's costing me money. What is ALSO costing me money is having to take time off and learn a new language and do the research. A forum is a perfect place (or should be) to ask a question and get some feedback, ideally from (and PLEASE take note) someone who has experience with the question in hand. Whether it takes someone as high and mighty as you an hour to learn, or someone with little competence (me) a week to learn, I do NOT KNOW until I ask the damn question. I'm too busy working on a customers solution to suddenly sit back and say "Think I'll learn a new language today". I don't have the time.

So please, next time someone asks a question, irrespective as to whether you think they are competent or not or whether you think their question should be posted, then either put up and shut up or offer something constructive and helpful. Otherwise you're just going to look a [Vb.Net] nothing / [C#] null



*edit* Inquisitor - thanks for that answer - yes as I've mentioend the ending syntax will be the same, but it was the syntax for the methods that I thought would be totally different. Thanks for the way you answered though, appreciated.
 
BTW: Had my answer now, so really really can't be bothered to reply to anymore of your crap DJ.

Apologie to anyone who's had to put up with the crap flying about.

*Case closed.*
 
Back
Top Bottom