Kumar Ravishankar

Kumar Ravishankar

  • NA
  • 437
  • 7.7k

I have nested structure kind of class file

Mar 8 2018 5:29 AM
public class TravelDetails
{
public TravelDetails()
{
}
public class Individual
{
public class RiskDetails
{
public bool IsIndianCitizen { get; set; }
public bool IsOverSeasCitizen { get; set; }
public bool IsResidingInIndia { get; set; }
}
}
public class Individual
{
public class IndividualNew
{
public string PreExistDiseaseID { get; set; }
public bool IsVisitingUSACanada { get; set; }
public string VisitingCountriesID { get; set; }
}
}
public class Accessing
{
public class AccessingAgain
{
public string PreExistDiseaseID { get; set; }
public bool IsVisitingUSACanada { get; set; }
public string VisitingCountriesID { get; set; }
public DateTime JourneyStartDate { get; set; }
}
}
}
 
I have above kind of class stracture , so can I access properties by createting object of TravelDetails class, and properties should be assign as per class stracture

Answers (5)