Reflection

  • Thread starter Nikolay Podkolzin
  • Start date
N

Nikolay Podkolzin

Good afternoon. I have a two classes


public partial class ContactUsFormSelector : System.Web.UI.UserControl

{

private bool _ContactUsForm;

private string lblTitle = "";




protected void Page_Load(object sender, EventArgs e)

{

}



public bool CustomContactUsSelector

{

get { return _ContactUsForm; }

set { _ContactUsForm = value; }

}



public string ControlCaption

{

get { return lblTitle; }

set { lblTitle = value; }

}

}

}

And secont class

class Two
{
public string GetVal()
{}

}

In the body of second class I need to get a property that stores in the
first class?

How could I do that?
 
H

Hans Kesting

It happens that Nikolay Podkolzin formulated :
Good afternoon. I have a two classes


public partial class ContactUsFormSelector : System.Web.UI.UserControl

{

private bool _ContactUsForm;

private string lblTitle = "";




protected void Page_Load(object sender, EventArgs e)

{

}



public bool CustomContactUsSelector

{

get { return _ContactUsForm; }

set { _ContactUsForm = value; }

}



public string ControlCaption

{

get { return lblTitle; }

set { lblTitle = value; }

}

}

}

And secont class

class Two
{
public string GetVal()
{}

}

In the body of second class I need to get a property that stores in the
first class?

How could I do that?

Just write a property:
public Two ValueTwo { get; set; }

or "longhand"
private Two _valueTwo;
public Two { get { return _valueTwo; } set { _valueTwo = value; } }

Hans Kesting

By the way: what does this problem have to do with "reflection" (your
subject)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top