|
-
Dec 28th, 2003, 11:09 PM
#1
Thread Starter
Frenzied Member
When should I use Functions within a structure?
Lets say Im writing a class that does some information parsing and has many Properties. Now some of these properties could be divided into groups
eg:
my class describes some version info about the data that is coming in
eg. Major Version, Minor Version, Revision, Build Number
should I do somthing like this
VB Code:
Class MyTestClass
Public structure sVersion
Dim sMajor as Short
Dim sMinor as Short
Dim sRevsion as Short
Dim sBuild as Short
Functon Parse(strData as String)
'sets values about based on strData
End Function
End Structure
End Class
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Dec 29th, 2003, 01:18 AM
#2
yay gay
If it's only a function and you'll have a LOT of structs its okay, otherwise just stick out with classes
\m/  \m/
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
|