Hi,
I've created a windows form application. I have a form and a .cs file
in the application, and I've renamed them to MyDialog and MyClass.cs.
In MyClass.cs, I have a member called "Publisher" and I assign value
to this member in MyClass.cs.
In MyDialog (upon a button click), I'll need to use the current value
of "Publisher" from MyClass.cs. But I don't know how. Anyone can
help?
FYI, my code is below:
namespace MyNamespace
{
public class MyClass
{
string Publisher;
public MyClass()
{
Publisher = String.Format("_FTDIALOG_{0}",
TritonObjectManager.User.GetField("RTGRP").ToStrin g().ToUpper());
Logger.LogMessageBarMessage(ESeverity.Detail, "In MyClass --
Publisher: " + Publisher + "|");
}
}
}
namespace MyNamespace
{
public partial class MyDialog : Form
{
string Publisher;
public MyDialog()
{
InitializeComponent();
}
private void btExecute_Click(object sender, EventArgs e)
{
//Need to get the value of Publisher from MyClass here!
// How to use the current value of Publisher from MyClass?
Logger.LogMessageBarMessage(ESeverity.Detail, "In MyDialog --
Publisher: " + Publisher + "|");
}
}
}