How can I pass my different request objects to the same method for formatting?
<p>Edited Question: This should be clear.</p>

<pre><code>        using System;

        namespace UpdateDateTimeFields
        {
        class Program
        {
        static void Main(string[] args)
        {
        string dateTimeFormat = "dd/MM/yyy HH:mm:ss";

        DateTime time = DateTime.Now;
        Update(time, dateTimeFormat);  //Should update time


        movemnet mymove = new movemnet();
        mymove.FromDate = DateTime.Now;
        mymove.ToDate = DateTime.Now;
        mymove.Name = "Test_Movement";
        Update(mymove, dateTimeFormat); //should update FromDate, ToDate

        ParentClass cls = new ParentClass();
        cls.mv.FromDate = DateTime.Now;
        cls.mv.ToDate = DateTime.Now;
        cls.CurrentDate = DateTime.Now;
        cls.Comment = "ParentClass_Comment";
        Update(cls, dateTimeFormat); //should update FromDate, ToDate, CurrentDate

    }

    private static void Update&lt;T&gt;(T Request, string format)
    {
       // How can this be acheived ???

        //tried with Using Reflection to Get and Set values of Properties - NO JOY !!!
    }
}

internal class movemnet
{
    public DateTime FromDate { get; set; }
    public DateTime ToDate { get; set; }
    public string Name { get; set; }
}
internal class ParentClass
{
    public movemnet mv { get; set; }
    public DateTime CurrentDate { get; set; }
    public string Comment { get; set; }
}
</code></pre>

<p>}</p>
