Change a class property from external method using ref
===

An error has been occurred while try changing the string property inside class,
but if assign ('f.StartTime' to a string variable it's work but doesn't change the 'StartTime' property)

like:

    string x = f.StartTime;
    ChangeText(ref x);  // There's no error, but f.StartTime didn't change.
    //Unless:
    f.StartTime = x;

of course it's Fake Method...

so i want perform the following code.

    public class MainClass
    {
        public class Foo
        {
            public string StartTime { get; set; }
            public string ToTime { get; set; }
        }

        private void ChangeText(ref string Time)
        {
            Time = DateTime.Now.ToString();
        }

        public void SetClassObjects()
        {
            Foo f = new Foo()
            {
                StartTime = "Any Text",
                ToTime = "Any Text"
            };

            ChangeText(ref f.StartTime);

            // An error: A property, indexer or dynamic member access may not be passed as an out or ref parameter
        }