vendredi 24 février 2017

Converting Flat file to List which is a property of another class

public class DummyResponse
{
    public int UpdatedRecords { get; set; }
    public string Id { get; set; }
    public bool Isvalid { get; set; }
}

public class Request
{
    public List<DummyResponse> Changes { get; set; }
    public string ReuestedBy { get; set; }

    public Request()
    {
        Changes = new List<DummyResponse>();
    }
}

I have a flat file which contains tab separated data for Dummy Response. I want this to be serialized to Request object. The implementation needs should be generic as in I only need user to pass T (Request) in this case and identify the correct sub type to be filled from flat file.





Aucun commentaire:

Enregistrer un commentaire