I would like to ask whether is there a better way to return an object.
For example.
Object Class with properties
Public class objProps
Property ORDERNUM() As String
Property OWNER() As String
Property INFO1() As String
Property INFO2() As String
End Class
Runtime class where all the methods will be in here
Public class runTimeClass
inherits objProps
Public function FillData() As runTimeClass
Dim x as new RunTimeClass()
'' filling the object
x.ORDERNUM = "111"
x.OWNER = "TEST"
x.INFO1= "123"
x.INFO2 = "pop"
return x
End function
End class
'' This is a console program..
Public Class MainClass Sub Main () Dim x as new RunTimeClass() x = x.FillData() console.writeline( x.ORDERNUM ) End sub End Class
In this main class , the portion where
x = x.FillData()
Are there any other efficient ways ? Greatly appreciated if anyone could provide some suggestions or samples =)

New Topic/Question
Reply




MultiQuote







|