nkay

nkay

  • NA
  • 22
  • 0

event firing in a class

Aug 22 2007 3:03 AM
hello everyone in a class i have some properties. 4 of  them are static props. fifth of them is not public and in set method of the fifth one i want to fire an event. and parameters of the event the other four props.  event code in the set  method is like this;
if(value= =true)   // if the property gets the true event will be fired
{
if(event!=null)
{
event(1 static prop,2 statik prop.. 4 statik prop)
}
}
i assigned the value of true in c#. i use breakpoint in c# to debug. when te term comes to code
event(1 static prop,2 statik prop.. 4 statik prop) i control the properties values thy are right but  whn firing i get error "object reference not to set instance of an object". in the event parameters i use public variables of  properties. and if i write "if (evnt!=null)"  if block doesnt work but if i write if(event==null) this block works.

can anyone help please


Answers (3)