As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
visual basic.net is case insensitive so it allows the coder to write without caring or remembering the casing of variables. it also relieves from the 'undeclared variable' errors if you use the variable in another case than the one used in declaration. The fact that its line termination is a line feed makes it even more readable unlike C# or c++ that need good care in the casing and contineous war with following up with the {}, matching them and figuring out which is for which.
my question is what are the advantages of c# over vb knowing that both get compiled to MSIL so there is almost no performance difference between the two languages?
In the case of Visual Basic and C#. There is no real performance difference. But I know a lot of people, and I can conclude that people prefer C# when they learned the language C/C++ first. And people prefer Visual Basic when they learned Pascal First. It's just the syntax.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Smalltalk supports a syntax feature called "message cascades". Cascades are being adopted by the Dart Programming language.
As far as I know, C# doesn't support this. Were they ever considered during the design of the language? Is it conceivable that they could appear in a future version of the language?
In VB.Net there is the with keyword which I believe is used for this purpose (correct me if I'm wrong on this), however in C# they decided that it can often hurt readability and left it out (good in my opinion).
Some short details can be found at the below link, however the link to the microsoft page is no longer working:
http://blogs.msdn.com/b/csharpfaq/archive/2004/03/11/why-doesn-t-c-have-vb-net-s-with-operator.aspx
Note: If anyone has the following link archived I would love to read it (as the link is not working):
http://msdn.microsoft.com/vcsharp/team/language/ask/withstatement/default.aspx
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Please let me know the difference between C#.Net and VB.Net. I use C#.Net for my projects, but when ever I met with some other programmers they often called VB.Net more powerful and easy, than C#.Net. I always asked them "Why it is more powerful then C#, since it uses the same framework?" but still I didn't get any helpful answers.
Pointers (C#)
XML literals (VB.NET)
VB6 leftovers (VB.NET)
A few other syntax differences
In the end, not a whole lot. Although, some say C# programmers are better paid (never looked into it, but it's possible).
It also depends on your definition of 'powerful' and 'easy'. Both are powerful at their jobs. C# may have a slight advantage in terms of performance since it has pointers.. but they are rarely used in most cases.
Technically, there is no difference except the syntax. Both use the Common Language Runtime (wikipedia) (msdn). They are just two different languages that use the same libraries, and actually compile to the same thing. This is one of the reasons you can write a library in VB.net, compile it to a dll, and include that dll in a c# program.
There are some small differences, but for the most part, the choice of one over the other is almost entirely personal preference. Personally, I find the c# syntax to be less prone to errors, but some people like the "english-ness" of VB.
It's the same thing. I don't even know why Microsoft have C# and VB since it really does the same things.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Is it just a matter of preference and familiarity or the language makes an actual difference?
Both are treated as first-class supported languages in terms of the Kinect SDKs, but the C# version is I think just a wrapper around the C++ version.
Standard managed C# vs unmanaged C++ arguments apply from this point forwards.
My preference? I know C# very well and am comfortable using it, so I'd start with that. If I identify performance issues because I used C# I can tackle those later on, but I seriously doubt that would ever happen.
Don't forget, you could always dip into unsafe C# in order to improve performance on any image processing logic you have - and still keep the managed support.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
After reading this old post from Clinton Begin (creator of iBatis) I really wonder if his claims about annotations vs. attributes are widely accepted or if there is disagreement about it.
His points are:
Annotations are not extendable
No support for positional arguments
Java-unlike definition syntax
annotation is not a keyword (unlike enum)
Do those claims have merit and how does C# improve on that?
Well taken one by one those points obviously have merit:
Attributes are classes you can extend and query as you wish. You can even add your own!
Position arguments (I'm guessing you mean named arguments) are indeed possible with C#, with full Intellisense support.
Can't really comment on how weird it looks, although coming from Razor it makes me think of macro expansion.
Attributes don't have a keyword either, they're just a normal class.
That doesn't make Java's implementation worse, since they had a different goal in mind: backwards compatibility. C# had the advantage of building the language from scratch (and then progressing forward instead of maintaining strict backwards compatibility).
As a nit-pick though, nothing you or I mentioned are part of C#, they are part of the .NET runtime and can be found equally well in VB.NET and F#.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm looking for a linear programming solver for C#. In the other words I'm looking for a library for C# that solves linear programming problems.
I need an easy to use library (so I can learn how to use it quickly), but it would be nice if it supported some features as automatic absolute values conversion (so I don't have to program the conversion myself). It is important that the library should be for free (not necessarily open source).
Good documentation is huge advantage for me. 10%-20% worse performance is not critical for my project.
Thanks for your answers
Math.NET
Read C# linear algebra library
EDIT: Check out http://en.wikipedia.org/wiki/Linear_programming#Solvers_and_scripting_.28programming.29_languages
This one might be what your looking for though. Says it works with .Net
http://lpsolve.sourceforge.net/5.5/
You can use WNLIB, but it's plain C so you have to wrap it in a DLL library and then use it with C#.