With is considered by some to be poor
programming practice because it obscures the enclosed code purely
for the benefit of reduced typing of one object name during
development - you can't see what object you're applying
the With operator to from within in the middle of a long With
.Name = "Zak"
.Age = 50
.Language = Language.English
The closest that you can get in C# is to use a temporary variable with an abbreviated name, but this also obscures your code:
Person p = SomeExtremelyLongNamedPersonObject;
p.Name = "Zak";
p.Age = 50;
p.Language = Language.English;
VB.NET and C# Equivalents
Copyright © 1997 – 2017 Tangible Software Solutions Inc.