This code I am working on is not working properly. It displays this error when hello() is invoked:
nameThisString "does not exist in the current context"
I have the overall code structure (it's simplified greatly to get to the point). What is wrong with my code?
using System.Windows.Controls;
namespace Application3
{
public partial class MainView : UserControl
{
public SecondClass secondClass;
public MainView()
{
InitializeComponent();
hello();
}
private void hello()
{
secondClass.nameThisString("hello");
}
}
public class SecondClass
{
public void nameThisString(string what)
{
what = "me";
}
}
}