forum

Home / DeveloperSection / Forums / How to get a private property name with value

How to get a private property name with value

Samuel Fernandes 2054 16-Dec-2013

Is there anyway I can get my private property of a class from another class? Here what I have tried.

class Program
{
    static void Main(string[] args)
    {
        Sample aSample = new Sample();
        //Is there anyway to access that Name private property here?
    }
}
class Sample
{
    private string Name { get; set; }
}


c# c# 
Updated on 16-Dec-2013

Can you answer this question?


Answer

1 Answers

Liked By