6 Replies - 1091 Views - Last Post: 07 September 2011 - 07:21 PM Rate Topic: -----

#1 Psyguy   User is offline

  • D.I.C Regular
  • member icon

Reputation: 84
  • View blog
  • Posts: 365
  • Joined: 12-January 11

C# to VB.NET translation

Posted 07 September 2011 - 12:40 PM

in C#:
Public abstract class Class1 : Class2



Any ideas?
Is This A Good Question/Topic? 0
  • +

Replies To: C# to VB.NET translation

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15360
  • View blog
  • Posts: 61,601
  • Joined: 12-June 08

Re: C# to VB.NET translation

Posted 07 September 2011 - 12:47 PM

It shows a class (name on left) is derived from another class (name on right)

http://msdn.microsof...y/ms173149.aspx
Was This Post Helpful? 1
  • +
  • -

#3 Psyguy   User is offline

  • D.I.C Regular
  • member icon

Reputation: 84
  • View blog
  • Posts: 365
  • Joined: 12-January 11

Re: C# to VB.NET translation

Posted 07 September 2011 - 12:53 PM

How would the syntax for VB.NET go for that? In looking at the page you provided, it says no samples are available for VB...there has to be a way to do it, right?

Edit: is it the "Inherits"?

This post has been edited by Psyguy: 07 September 2011 - 12:55 PM

Was This Post Helpful? 0
  • +
  • -

#4 Martyr2   User is online

  • Programming Theoretician
  • member icon

Reputation: 5496
  • View blog
  • Posts: 14,470
  • Joined: 18-April 07

Re: C# to VB.NET translation

Posted 07 September 2011 - 12:57 PM

Public MustInherit Class Class1 : Inherits Class2

      ' Override Class2 methods here
     
End Class



There is an example skeleton for you. Here MustInherit is a keyword to say the class must be inherited from (aka is abstract) and that it itself inherits functionality from Class2.

Enjoy! :)
Was This Post Helpful? 1
  • +
  • -

#5 Psyguy   User is offline

  • D.I.C Regular
  • member icon

Reputation: 84
  • View blog
  • Posts: 365
  • Joined: 12-January 11

Re: C# to VB.NET translation

Posted 07 September 2011 - 01:02 PM

Thanks!
Was This Post Helpful? 0
  • +
  • -

#6 raziel_   User is offline

  • Like a lollipop
  • member icon

Reputation: 469
  • View blog
  • Posts: 4,281
  • Joined: 25-March 09

Re: C# to VB.NET translation

Posted 07 September 2011 - 01:07 PM

i would suggest this tool for translations from VB.NET to C# and the other way around
http://www.developer...t/vb-to-csharp/
it do pretty descent job but still there are differences from VB.NET and C# and also checks for mistakes
Was This Post Helpful? 0
  • +
  • -

#7 Yo!   User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Re: C# to VB.NET translation

Posted 07 September 2011 - 07:21 PM

A nice tool I found is called JustDecompile, works well for getting source code for VB.NET, C#, Assembly, programs.
Only thing: you have to compile it into an executable so it may or may not work so well with what you are doing possibly.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1