|
Short answer - suck it up.
VB has a bad reputation, a lot of it deserved. I worked with VB from conception on early Windows through to VB6 and started moving into VB.Net bey never transferred. C# and VB.Net compile to the same runtime and AFAIK most of not all commands are convertable 1:1. A lot of people won't accept that the two are in the same ecosystem but you can chose - stay with what you know or move on.
In my career, I started in COBOL and moved through various other languages - including C, VB and Java - and I now find myself as a newbee with all the web tech. The answer is not to moan, but to knuckle down and learn the new stuff.
veni bibi saltavi
|
|
|
|
|
Bro!
You are absolutely right. There are many commands in vb which can,t be converted in C# but most people don,t accept this reality.
I am also feeling myself a newbie and worrying about it. I never think i can,t do something in programming but when i look to markete then this reality comes that vb don,t have demand.
With passing time while i am practicing c# i am found that it is realy becoming easy for but in heart i still prefer vb upon c#.
|
|
|
|
|
Member 9993589 wrote: Bro!
... and I stopped reading.
veni bibi saltavi
|
|
|
|
|
Using the word "Bro" I showed respect for you. but i can,t understand why you stopped reading... have i done something wrong which you don,t like?
|
|
|
|
|
Yeah, I have seen this discussed from time to time. For Microsoft, VB.net carries almost no expense as they do not have to maintain a separate compiler. Visual Studio just translates both C# and VB.net into the intermediate language (CIL?) which then gets compiled. (Actually I have heard C# described as C++ with VB goodness baked inside).
Interestingly, according to TIOBE this month VB.net ranks #7, between Python at #6 and PHP at #8. Even Visual Basic (VB6?) ranks at #11 just above Perl.
There are a lot of prejudices out there. I have noticed hard-core C programmers tend to look down their noses at C++ and C# folks. Then again Assembler programmers tend to look down on all the Compiler folks (C included), who in turn tend to look down on folks using Interpreted languages. Then again I am sure that 50 years ago there were folks entering programs on the register switches in front of computers back then who thought the Assembler folks were clots (I did this once, no great fun tho).
In short, Member 9993589, welcome to programming!
|
|
|
|
|
Despite all the "holy wars" regarding the best language, for most projects the choice of language is arbitrary. Possible exceptions are projects where access to the hardware is essential, or there are hard real-time or memory requirements.
Most of us don't have the luxury of programming in the language that we love most. This may be because the legacy code was written in a different language, because of contractual requirements, or even because your boss prefers a different language.
I suggest that you learn whatever languages can keep you employed, and develop any personal projects in the language you love.
Good luck!
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Member 9993589 wrote: vb only developers ... can switch to c# easly [sic] but their hearts shall always stick with vb ... I love vb
I was tempted to mark this as abuse.
Once you lose your pride the rest is easy.
In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha
|
|
|
|
|
"I was tempted to mark this as abuse. Big Grin | "
Looking funy
|
|
|
|
|
Anything you can do in C# you can do in VB.
But...it doesn't work the other way round: and for that I'm truly glad. VB is a very old language which was designed to be used by non-programmers, and it retains some of that to this day. Most of the stuff you can do in VB that you can't in C# improves the quality of code and the ease of maintenance. String typing rather than weak typing is the major plus here, but any language which retains "On Error Resume Next" should be recycled as firelighters...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: Anything you can do in C# you can do in VB.
Unsafe code?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
All VB code is unsafe!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: Most of the stuff you can do in VB that you can't in C# improves the quality of code and the ease of maintenance. String typing rather than weak typing is the major plus here
I'll just mention dynamic then.
OriginalGriff wrote: On Error Resume Next
Ever seen an empty catch?
Don't blame crappy programming on the language.
Basic was originally pushed as a beginners language, but after all the bashing all beginners nowadays learn Java or C#.
Take another good look at Q&A some time. I'd say there are more stupid questions regarding C# than VB.Net nowadays.
Not to mention JavaScript.
|
|
|
|
|
Jörgen Andersson wrote: I'll just mention dynamic then
Please, don't. var was bad enough, but at least it has a need - Linq won't work without it. dynamic is a retrograde step IMO.
Jörgen Andersson wrote: Ever seen an empty catch?
On Error Resume Next is like an invisible empty catch block round every single line of code...empty catch is bad enough, but when you can't even see them?
Jörgen Andersson wrote: Don't blame crappy programming on the language.
I don't: you can write cr@p code in any language and (with a bit of work sometimes) you can write excellent code in every language. But some languages encourage good code, by making it harder to make mistakes. And some languages encourage cr@p code by making it harder to do things properly!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: var was bad enough, but at least it has a need - Linq won't work without it
Really?
I'm not having a good enough understanding of the plumbing behind Linq to be able to say you're wrong, but you can always select real types instead of anonymous types if you want to.
But yeah, the freaks that are known as linq to SQL spit and Linq to XML might be a different story.
OriginalGriff wrote: Error Resume Next is like an invisible empty catch block
It's rather quite visible.
The problem is rather, that actually handling errors in old VB was even worse. Just taste the syntax "On Error Goto ...", yes it says GOTO
I don't understand the need to always be backward compatible.
|
|
|
|
|
Afraid so - Linq works by creating anonymous types which are specific to the query - so if you don't have a "define this from context" variable type it can't do things like this:
var v = myCollection.Where(w => w.ID < 10).Select(s => new {ID = s.ID, Name = s.Name}); Because you can't declare
IEnumerable<WhatNameWillTheCompilerGiveThatDamnThing> v = ...
It only annoys me when people use it as a shortcut datatype:
var v = 123; Or to be really annoying
var v = GetSomething(somethingElse); because it may save you 5 seconds typing, but I'm going to have to hunt down the method declaration to try and work out the heck you are doing...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
And if you don't create anonymous types?
You'll get:
Person v = myCollection.Where(w => w.ID < 10).Select(s => new Person {ID = s.ID, Name = s.Name});
Works just fine converting types this way too, consider:
class Program
{
static void Main(string[] args)
{
List<SalesPerson> SalesPersons = new List<SalesPerson>();
SalesPersons.Add(new SalesPerson { ID = 1, Name = "Adam", IQ = 30 });
SalesPersons.Add(new SalesPerson { ID = 2, Name = "Benny", IQ = 40 });
SalesPersons.Add(new SalesPerson { ID = 3, Name = "C***", IQ = 20 });
List<Person> Persons = SalesPersons.Where(item => item.Name.StartsWith("B")).Select(item => new Person { ID = item.ID, Name = item.Name }).ToList();
Console.WriteLine(Persons.FirstOrDefault().Name);
Console.ReadKey();
}
}
public class Person
{
public int ID { get; set; }
public string Name { get; set; }
}
public class SalesPerson
{
public int ID { get; set; }
public string Name { get; set; }
public int IQ { get; set; }
}
Nothing anonymous there.
I do that a lot since I hate the fact that anonymous classes are local to the method they're created in.
So Ok that was not entirely true, you can actually pass anonymous types between methods, if you reuse the definition the compiler actually reuses the anonymous class. But that would require a lot of casting.
|
|
|
|
|
Was I that far off the target?
|
|
|
|
|
Jörgen Andersson wrote: Ever seen an empty catch? Hey! You been lookin' at my code?!
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
There are perfectly legitimate reasons to have an empty catch block.
Just can't think of any right now.
|
|
|
|
|
OriginalGriff wrote: Anything you can do in C# you can do in VB.
Events based on delegates with non-void returns?
(My personal favorite.)
|
|
|
|
|
IMHO, problem-solving skills are more important than programming language skills. Once you are able to architect a solution, the language is not that important. Try to enhance your problem-solving skills. What the end user wants is a working solution, and is, more often than not, not bothered about what's under the hood.
Having said that, its better to work in a modern language, and VB is not likely one of them. Its better to learn languages useful for the web - HTML5, CSS, JS.
|
|
|
|
|
Absolutely you are right. I think too much and i have confidence and i can say i can solve any challanging problem in vb. But i want to tell that i am in a far village where internet is available but there is no any city near and this is backward area and i am not in contact with professional peoples where from i can take some work and do it by myself.
I shall like if someone gives me some programming work i shall do it free of cost because whole day i am free in these days. And it is better to do something than doing nothing.
I learnt programming by myself in home but i never did professional working i don,t know what is professionalism. So please someone attach with me i shall server him/her free and in result i shall become professional.
|
|
|
|
|
Only once i went to a city which is far from here and i stayed there 3 months and from there i came to know vb don,t have demand in markete. After this i searched internet and i found vb realy don,t have demand in markete.
|
|
|
|
|
There is a demand. Not a big demand, but it's there. All our new projects are in C# but we have legacy VB.NET apps, including one set of web services we just worked on to handle our migration from AS/400 to Oracle. There are probably a lot of shops like ours.
Do learn C#, though. I fought it for years, and now I love it. I do miss certain functions from VB, though.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
I know html, css, javascript, asp.net(razor view), php and many others but i am not professional in any of them.
|
|
|
|