Equivalent of VB.NET's With statement in C#

  • Thread starter Thread starter Jeff0803
  • Start date Start date
J

Jeff0803

Guest
I'd like simplify following codes with something like "With" statement in VB.NET.

PatientLocalImport patlocalimport = new PatientLocalImport();
patlocalimport.importMode = ImportMode.UPDATE;
patlocalimport.patientlocal.PatientID = patient.PatientID;
patlocalimport.patientlocal.CellPhone = patient.CellPhone;
patlocalimport.patientlocal.AvoidReminder = pat.AvoidReminder;
patlocalimport.patientlocal.MessageNo = pat.MessageNo;
patlocalimport.patientlocal.ActiveDatetime = pat.ActiveDatetime;
patlocalimport.patientlocal.RecallMessageNo = pat.RecallMessageNo;
patlocalimport.patientlocal.ConfirmMessageNo = pat.ConfirmMessageNo;

How to do it in C#?

Continue reading...
 
Back
Top