|
-
May 17th, 2003, 03:43 PM
#1
Thread Starter
Frenzied Member
VB.Net and C# question (Translating?)
This might appear a silly question... But someone said "There is no sillier question than the one that is not asked"
So here is my question: I was asked to develop an application in any other language that is not VB.Net nor VB 6, so if I develop it on VB.Net is there a tool or a way that it will be translated into C# so I get the source code of C# of what I programmed on VB.Net?
Again, read it: "Is there a way to get my code from VB.Net translated into C#?"
Thanks...
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
May 17th, 2003, 04:08 PM
#2
Sleep mode
A tool ? I've not seen(I was interested too) that but there is one which translate C# into VB.NET code .
-
May 17th, 2003, 05:19 PM
#3
Fanatic Member
Probably a more popular application will be, Can I get IL code into LanguageX, and that's a matter of time I think.
-
May 17th, 2003, 06:30 PM
#4
Thread Starter
Frenzied Member
Well.. I heard that since Visual Studio .Net would work everything under C# so all what we developed was actually translated to C#, solving the problems of compatibility so I was wondering if anyone know how to access to this "code" or maybe I was told wrong...
I would like to know... I heard it was one of the advantages of VS .Net that you could change of language just with an utility...
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
May 18th, 2003, 02:25 AM
#5
Fanatic Member
//I heard that since Visual Studio .Net would work everything under C# so all what we developed was actually translated to C#, ...
That's not correct actually, all .NET application code is pre-compiled into MS Intermediate Language, or IL, a sort of Assembler-ish behind the language.
Quoting from Applied Microsoft .NET Framework Programming for Visual Basic: A managed EXE contains a PE (portable executable) header, a .text section, a .idata section, a CLR (common language runtime) header, the IL (intermediate language) code, and Metadata. At execution time the .NET runtime environment compiles the IL and metadata into machine code specific to your operating system and CPU and then the program executes. (a lot more than this goes on really but this is the simple version of it, there are many discussions as to how the process exactly works)
This means that embedded in your EXE files is the Intermediate Language code, which can relatively easily be translated into another language, like C# or VB .NET. I think it would be easier to write a translator from IL to Language X, rather than Language X to Language Y, although if you can do the first then you can do the second also (Language X -> IL -> Language Y).
-
May 18th, 2003, 12:00 PM
#6
Sleep mode
You're talking about decompiling from IL to source language then . Search the Forum for "decompilation" to get the tool . I can't remember the name exactly .
-
May 18th, 2003, 09:09 PM
#7
Hyperactive Member
Re: VB.Net and C# question (Translating?)
Originally posted by Tec-Nico
This might appear a silly question... But someone said "There is no sillier question than the one that is not asked"
So here is my question: I was asked to develop an application in any other language that is not VB.Net nor VB 6, so if I develop it on VB.Net is there a tool or a way that it will be translated into C# so I get the source code of C# of what I programmed on VB.Net?
Again, read it: "Is there a way to get my code from VB.Net translated into C#?"
Thanks...
Why can't it be in VB.NET if it can be in C#?
Oh, and the tool you're looking for is from www.remotesoft.com/salamander
However, I've heard that apps developed in VS.NET 2003 (or maybe just the framework 1.1) cannot be decompiled back like this.
-
May 19th, 2003, 06:29 AM
#8
yay gay
vs.net 2003 brings a free obfuscator, but if u dont use it apps can still be opened easily
\m/  \m/
-
May 19th, 2003, 07:22 AM
#9
Sleep mode
Originally posted by PT Exorcist
vs.net 2003 brings a free obfuscator, but if u dont use it apps can still be opened easily
Exactly . VS.NET2003 impressed me in this area .
-
May 19th, 2003, 08:05 AM
#10
yay gay
although im not really into the obfuscation technic things, i think that in some times there *can* appear some dissamblers that can de-obfuscate some kind of obfuscation..who knows..
\m/  \m/
-
May 19th, 2003, 08:15 AM
#11
Thread Starter
Frenzied Member
Sorry guys, I lost Internet for the weekend...
And I already began learning C# (It is incredible the amount of time you can have for doing that with no Internet)
But I will check that tool, it is great to have it at hand. Oh, and by the way, the professor did not want us to do it on VB because I know how to build object applications (I have worked with that for a time now) and I am good using VB, since he saw me smile when he told us what the project was about he added "Oh, and no VB, for you, ok? I want another language but VB since it is not completely oriented to Objects" So he just made my life difficult when he said that... He gave us less than a week for the program and he still wants me to learn another language.. Go figures!
Anyway, I am almost done learning... I just wish I knew how to use XML databases. I think I will learn that now.
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
May 19th, 2003, 10:52 AM
#12
Fanatic Member
Moving data from XML to dataset and back is frightfully easy, you just have to watch out for a couple of gotchas - default field values are changed from empty strings to DBNull when you go from dataset to XML schema, and when you select against criteria that has embedded single quotes you have to escape them out (search/replace them to two single quotes)
-
May 19th, 2003, 01:06 PM
#13
Sleep mode
Originally posted by PT Exorcist
although im not really into the obfuscation technic things, i think that in some times there *can* appear some dissamblers that can de-obfuscate some kind of obfuscation..who knows..
I agree somehow but at least your code in VS.NET2003 won't be hacked easily ....this is for you PT Exorcist ...
-
May 19th, 2003, 01:53 PM
#14
yay gay
hmm now i really got it how they do that..it is very interesting
\m/  \m/
-
May 19th, 2003, 04:32 PM
#15
Sleep mode
This is what you need exactly ! Check it out !!!
-
May 19th, 2003, 05:23 PM
#16
I wonder how many charact
Hell, if you had any previous C or C++ experience, porting the VB code into C# is just a matter of sittin down and going through your code... really, its mostly a matter of small syntax changes.
I'm actually developing a library in Vb.Net and plan to move most of it over to C# since that language has COMMENT tags which I find extremely useful. I've read about 2 hours worth of the Programming Windows with C# from MS press, and since I started porting a day ago, I've got almost 40 % of the code ported. I of course, developed the VB .Net code with Option Strict, so there have been no surprises really as yet.
When it comes down to it, you might as well get the hang of C#, because many jobs will be looking for development abilities in both...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|