Using the snippet below, how would I make the String songName a Global for use in other areas of the code?
a return? get;set;?
Any help would be appreciated.
public void Initialize(IExecutable executableObject, SetupData setupData, XmlNode setupNode)
{
this.m_setupdata = setupData;
this.m_setupnode = setupNode;
this.m_channels = executableObject.Channels;
EventSequence sequence = (EventSequence)executableObject;
if (!(sequence.Audio == null))
{
String songName = sequence.Audio.Name;
MessageBox.Show(songName);
}
else
{
MessageBox.Show("Please run setup after a audio has been assigned");
}
if (this.m_setupnode.SelectSingleNode("Settings") == null)
{
Xml.GetNodeAlways(this.m_setupnode, "Settings");
this.m_selectedIndex = 0;
}
else
{
XmlNode node = this.m_setupnode.SelectSingleNode("Settings/ChannelIndex");
this.m_selectedIndex = Convert.ToInt16(node.InnerText);
}
}