Users Pricing

forum

Home Forums How to get a private property name with value – MindStick

How to get a private property name with value

Samuel Fernandes 2446 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; }
}


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md