Login
Search
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 2
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2008, 08:42 PM
david0123 david0123 is offline
Junior Member
 
Join Date: May 2008
Posts: 2
Default

VB.NET Custom classes?


I have this class in my project:

Class PointType
Public X As Double
Public Y As Double
Public Z As Double
End Class

I create two PointType Objects like this:

Dim tempWorldPointB As PointType
Dim tempWorldPointA As PointType

tempWorldPointB = New PointType
tempWorldPointA = New PointType

tempWorldPointB.X = 1
tempWorldPointB.Y = 2
tempWorldPointB.Z = 3

This works

tempWorldPointA.X = tempWorldPointA.X
tempWorldPointA.Y = tempWorldPointB.Y
tempWorldPointA.Z = tempWorldPointB.Z

Why does this not work?

tempWorldPointA = tempWorldPointB
I do not get an error but the values become zero.

Lines like the following are within a loop and work the first time but not after

tempWorldPointA.X = tempWorldPointA.X

tempWorldPointA.Y = tempWorldPointB.Y

tempWorldPointA.Z = tempWorldPointB.Z

tempWorldPointA = tempWorldPointB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 05-14-2008, 08:44 PM
K4nj!n K4nj!n is offline
Junior Member
 
Join Date: May 2008
Posts: 2
Default

What error do you get?

I think it may be because 'tempWorldPointA' has no value from what I can see. It has 3 seperate values for X,Y,Z but not as 'tempWorldPointA'.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
css stylesheet with one brace area styling multiple tags at once?(no classes patrickt1994 CSS 5 06-23-2008 04:04 PM
When does it become necessary to use classes in php? xookinwitgas PHP 1 05-10-2008 09:26 AM
Java File I/O classes? David P Java, Java Servlets & JSP 2 05-06-2008 04:23 PM
Is it better to use ids or classes to style my divs with CSS? Chris M CSS 2 05-06-2008 01:18 PM
Custom CSS bullet list style is appearing in ALL unorderd lists, even if they... Henry J CSS 1 05-03-2008 08:25 PM

Your Ad Here

All times are GMT. The time now is 03:20 PM.