With statement declaration

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,530
Location
Lansing, MI; USA
Programming Experience
10+
I'm just curious, what exactly happens to the FileInfo object when it hits the 'End With'? I know it falls out of scope so I can't use it beyond that, but does it get assigned a null pointer or what?
VB.NET:
With New FileInfo(SomeFilePathHere)
    .Attributes = (.Attributes Or FileAttributes.ReadOnly)
End With
 
Back
Top