Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42225

VS 2010 [RESOLVED] Constructors - How Do I?

$
0
0
I'm working with some 3d stuff, and to start I'm going to create a new structure. It's very simple:
Code:

Public Structure Point3d
    ''' <summary>
    ''' The horizontal position
    ''' </summary>
    Public x As Integer
    ''' <summary>
    ''' The verticle position
    ''' </summary>
    Public y As Integer
    ''' <summary>
    ''' The depth position
    ''' </summary>
    ''' <remarks></remarks>
    Public z As Integer
End Structure

The reason I chose to make it a structure as opposed to a class is because of how tiny it is, and inheritance isn't needed. My question is, how do I create the constructors? For example, a point has three:
  1. Point(Int32)
  2. Point(Size)
  3. Point(Int32, Int32)


I've never worked on them before, and everything that I see has to do with the new constructor, but when in the code view for my designer, the Point3d doesn't have a new constructor.

Viewing all articles
Browse latest Browse all 42225

Trending Articles