Actually both are working in VB 2005, but I'm not a big fan of using Nothing
as this is really not the same semantic than for objects. I prefer New but
I'm not yet totally convinced as this is not really something "new".
The third option which I tried would be to create a shared readonly "Empty"
property that returns an empty structure. This way you would just write :
MyStruct=MeterAccountName.Empty
(I thought also about a clear method but i could be easy to add a field and
forgot to reset it).
--
Patrice
"Samuel Shulman" <sa************@ntlworld.coma écrit dans le message de
news:
ef**************@TK2MSFTNGP04.phx.gbl...
Perhaps you can create a method to do that or assign a new variable
ob = new MeterAccountName
<zu******@gmail.comwrote in message
news:11*********************@s13g2000cwa.googlegro ups.com...
>Hi i have a Public Structure:
Public Structure MeterAccountName
Dim Meter As String
Dim Account_No As String
Dim xName As String
End Structure
is their a way to clear a structure without having to do the
fallowing:
MeterAccountName.Meter =""
MeterAccountName.Account =""
MeterAccountName.xName =""
Thank you