Automatically Declare and Assign in Default

Good, if icompare (=, < ,>) anobject to another that have been already declare or assign , this first object without declaration must take the type default of the other which has been declared and assigned. this opration make short line to type. Maybe,no ?thanks.
[315 byte] By [ANDRIAMA] at [2007-12-16]
# 1
Huh?
What exactly are you trying to convert? (this opration make short line to type)
Dustin_H at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
I'm not quite sure either, but here is one way you could address it. For an optimization, I defined an explicit default value for types using Constants.



Dim i1 as Integer = 1
Dim i2 as Integer = 2

Const defaultInteger As Integer = 0

If i1 < i2 Then
i1 = defaultInteger
End If

If you want a more generic approach, you could use reflection to create instances of variables with defaults.

Paul Yuknewicz
Visual Basic

PaulYuk_MS at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...