Question need to know vb.net equivalent of c# statement

Harris00

Member
Joined
Feb 27, 2009
Messages
9
Programming Experience
3-5
Hi

I have below statement (bold, italics and red) in C#, but i want to know the vb.net equivalent. And also an explanation of c# statement would be great

IMessage m = parser.Parse(strMessage);//str message will contain your HL7 Message
ADT_A01 adtA01 = m as ADT_A01;
string strPID = adtA01.PID.GetPatientIdentifierList(0).IDNumber.ToString(); string strFamilySurName = adtA01.PID.GetPatientName(0).FamilyName.Surname.
ToString();

Thanks
 
VB.NET:
Dim adtAO1 As ADT_A01 = TryCast(m, ADT_A01)

Creates a new ADT_A01 and initializes it to a cast of m from IMessage to ADT_A01
 
Back
Top