hello guys! I have 2 windows forms, form1 and form2, and a class named Model and I created an instance of Class model in form1 name EventData and assigned value to its fields using the code below
FORM1
Class ModelCode:Model EventData = new Model(); EventData.EventTitle = ArgEvntTitle; EventData.EvenDate = ArgEvntDate; EventData.EventLocation = ArgEvntLocation;
my question is how can pass that instance,EventData, to an Instance of Class Model in form2?Code:using System; using System.Collections.Generic; using System.Text; namespace RefNumGen { public class Model { private string _EventTitle; private string _EventDate; private string _EventLocation; public string EventTitle { get { return _EventTitle; } set { _EventTitle = value; } } public string EvenDate { get { return _EventDate; } set { _EventDate = value; } } public string EventLocation { get { return _EventLocation; } set { _EventLocation = value; } } } }




Reply With Quote