lord_of_pop
New member
- Joined
- Jul 24, 2006
- Messages
- 3
- Programming Experience
- Beginner
hi guys
i hope to find the solution with u
iam trying to convert some code blocks from c# to vb.net
in C# u can make the event instance = null
and u can ask in the code wether it makes the instance or not
like this
public delegate void ChangePageEventHandler(object sender, frmMain.Pages Page);
public event ChangePageEventHandler ChangePage = null;
public void OnChangePage(frmMain.Pages Page)
{
if (this.ChangePage != null)
{
this.ChangePage(this, Page);
}
}
but in vb.net u cant assign "=nothing " to the event decleration
and u cant put the event in if statement to know wether it made the instance or not coz the compiler
tells u "this is event , use Raiseevent to call it"
plz help me in this
thanks
i hope to find the solution with u
iam trying to convert some code blocks from c# to vb.net
in C# u can make the event instance = null
and u can ask in the code wether it makes the instance or not
like this
public delegate void ChangePageEventHandler(object sender, frmMain.Pages Page);
public event ChangePageEventHandler ChangePage = null;
public void OnChangePage(frmMain.Pages Page)
{
if (this.ChangePage != null)
{
this.ChangePage(this, Page);
}
}
but in vb.net u cant assign "=nothing " to the event decleration
and u cant put the event in if statement to know wether it made the instance or not coz the compiler
tells u "this is event , use Raiseevent to call it"
plz help me in this
thanks