B
Bijoy Thulasidharan
Hi ,
Hope you should be able to help us out with the below issue
Before subscribing to a delegate like this
cell.OnGridCellSelected += new
System.EventHandler(_OnGridCellSelected);
we would like to check whether it was already subscribed to .
Ofcourse the compiler doesnt allow checks like these
if (!cell.OnGridCellSelected=null) cell.OnGridCellSelected
+= new System.EventHandler(_OnGridCellSelected);
what we are instead doing is
cell.OnGridCellSelected -= new
System.EventHandler(_OnGridCellSelected);
cell.OnGridCellSelected += new
System.EventHandler(_OnGridCellSelected);
which we arent sure whether is exactly a good practise
Any sample illustrations or alternative suggestions would be highly regarded
Kind Regard s
Bijoy
Hope you should be able to help us out with the below issue
Before subscribing to a delegate like this
cell.OnGridCellSelected += new
System.EventHandler(_OnGridCellSelected);
we would like to check whether it was already subscribed to .
Ofcourse the compiler doesnt allow checks like these
if (!cell.OnGridCellSelected=null) cell.OnGridCellSelected
+= new System.EventHandler(_OnGridCellSelected);
what we are instead doing is
cell.OnGridCellSelected -= new
System.EventHandler(_OnGridCellSelected);
cell.OnGridCellSelected += new
System.EventHandler(_OnGridCellSelected);
which we arent sure whether is exactly a good practise
Any sample illustrations or alternative suggestions would be highly regarded
Kind Regard s
Bijoy