How do I pass an object from one method to another?
From the code below, I would like to pass newEvent from xmlReader() to outputData()
public class Event
{
public int ID {get; set;}
}
public void xmlReader()
{
Event newEvent = new Event;
newEvent.ID = 56;
outputData(newEvent);
}
public void outputData(object theEvent)
{
MainContainerDiv.InnerHtml = theEvent.ID;
}
Thank you, Jordan