Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any way to typedef in VB.NET 1

Status
Not open for further replies.

Axoliien

Programmer
Aug 19, 2003
166
US
I was wondering if there is any way to typedef like in C++ in VB.NET. I have a lot of qualified references and would like to shorten their names.

Thanks!
 
Not in .NET. The closest you'll get to TYPEDEF is in judicious uses of Imports and Classes.
 
Okay, back from a memory refreshing trip to google.

Couldn't you do something like:
Code:
Public Class ActualClass
  Private Class MyClass
    Inherits Integer
  End Class

  Public Sub DoThing
    dim MyVar as MyClass = 1
    '...
  end sub
End Class

That's untested, and it takes a few lines as opposed to the inline nature of TypeDef.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top