|
Why convert the project? Keep it as a VB assembly, and reference it in the C# UI.
Why reinvent the wheel, if all you are doing is probably introducing problems?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I plane didn't think of that! but found a web site linked to the developer fusion one that has a service to do the change from VB.Net to C#
|
|
|
|
|
If it ain't broke...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Is the syntax of VB really so appalling that you refuse to work with it? I find that funny as it simply uses the alphabet which we read every day.
Other than the syntax it's .NET, so the same as C# (possibly with Option Strict set to Off, which is bad).
Automatically converting it won't make the code any better (but probably worse), you'll just have bad code that's written slightly different.
I'm so tired of this C# vs. VB.NET debate.
It's the same framework with (mostly ) the same options.
Do you really feel so much better because you write C# instead of VB?
Personally I've seen code in both C# and VB that makes you want to spoon your eyes out.
|
|
|
|
|
I'm not really bashing VB.Net (it is just the Syntax that is different), only really due to me not really being a basic programmer, I'm a hardware guy really I feel happier with C (or assembly!) as I can look at it and see quicker why it's not working where as with Basic I always have to read the code carefully, I was really only happy with basic at school on a BBC Master (to date me!). Really it is just speed with this this is 'pretty is nice, ugly works' time is critical!
modified 24-Feb-16 12:46pm.
|
|
|
|
|
Why the DLL should appear as COM port? For this you need to write a .inf file to "install" your vid/pid as a cdc device and assign a COM port.
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Quote: Why the DLL should appear as COM port? believe me I know all about PID/VIDs and CDC device...we are old foes. I was just that this board didn't do that. It uses some Native means of sitting on the USB tree, as a HID compliant device rather than a CDC, hence my question about converting the project.
|
|
|
|
|
Sorry, was not my Intention to be pedantically.
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Nah! it's alright, just with having to do the hardware for this as well I don't want to get to far down the interfacing chain!
|
|
|
|
|
Well written and designed VB is fine so you may be pleasantly surprised when looking at the code.
I think it is just that because VB has become synonymous with bad coding that it common amongst us to assume that VB is a bad choice.
It's the same framework, Griff's suggestion of converting it to a DLL is a good one - I have done this myself and in my C# projects I use some code that was previously written in VB as converting it to C# would risk introducing errors.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Sanity has returned I have managed to find the DLL I think it uses and now it looks alot easier than I though! note to self 'when you can see trouble in the distance don't immediately yell for help, you might not need as much as you think!'
|
|
|
|
|
If you don't want pictures of yourself eating bacon, should they be pigselated?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Six large beers make my memories blurred enuff.
Life is too shor
|
|
|
|
|
Only on an ad hock basis!
I am not a number. I am a ... no, wait!
|
|
|
|
|
|
No, a ham hock is a wonderful Southern USA thing.
Although hog could have worked too.
|
|
|
|
|
A very pork excuse for a pun.
If you're going to hit us with that slop I'm sure someone will squeal on you.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
a hogsfie ?
I'd rather be phishing!
|
|
|
|
|
If it was a prawn sandwich, would that be a selfish?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Though I'll go as far as the next man in search of a good pun I really have to put my pedant hat on and insist that a prawn is a crustacean and therefore seafood but never shellfish!
I am not a number. I am a ... no, wait!
|
|
|
|
|
[I hope this doesn't cross the line of what I shouldn't post about here...]
I was just reminded of the oft-given advice that to improve your coding skills you should "read lots of code". This made me wonder: What code should I read? If I were a painting instructor, I would advise my students to study the masters: Michelangelo, VanGogh, Norman Rockwell, Bill Watterson. But what about coders?
What are some of the classic code-bases that every aspiring software developer should read at least once in his/her life? Alas, some of the best are doubtless locked up behind proprietary firewalls, but of the code that is publicly available, which programs would you suggest are worthy of studying or even emulating?
|
|
|
|
|
IMHO, the advice is misleading. I think the author meant you should try to learn from other people's code in the context of the work you're doing.
For example, if you've been tasked with fixing a SQL injection bug in a method (easy enough to do), look for other places in the codebase where this has been done and see if the developer implemented other safeguards (e.g. validating or auto-fixing parameter values).
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: ), look for other places in the codebase where this has been done and Copy/paste what you find there.
Yes, I have seen that project
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Copy/paste Or refactor.
/ravi
|
|
|
|
|
There's a lot of the .NET world that is now open source (Roslyn code compilers, Entity Framework)...I'd say reading through how they organise their code would be somewhat informative.
|
|
|
|