KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In C# I can test for this... public event EventHandler Trigger; protected void OnTrigger(EventArgs e) { if (Trigger != null) Trigger(this, e); } Is there a way to do this in VB.NET? Test for null I mean? MORE INFO I forgot to mention. I have classes written in C# but I am writing my unit tests in VB.NET. I am trying this in the unit test... If myObject.Trigger IsNot Nothing Then ''#do something End If This is causing a compile time error which says ... "Public Event Trigger is an Event and cannot be called directly. Use the RaiseEvent statement to raise an event." Seth
Tags (comma-separated)
Save Edits
Cancel