0

Possible Duplicate:
What is a NullReferenceException in .NET?

Hi I have following line in my code that keeps giving me an error "Object not set to an instance of an object" I tried different things but nothing seems to shake it off. I will appreciate idea why it is doing that.

  IEmailCallback  cb=OperationContext.Current.Getchannel<IEmailCallback>
Community
  • 1
  • 1
J. Davidson
  • 3,297
  • 13
  • 54
  • 102
  • 3
    Presumably `OperationContext.Current` is null. Are you possibly using threads? – Kirk Woll Jan 31 '13 at 00:18
  • 3
    Almost all cases of `NullReferenceException` are the same. Please see "[What is a NullReferenceException in .NET?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-in-net)" for some hints. – John Saunders Jan 31 '13 at 00:19
  • 1
    To help see which object is null, set a breakpoint on that line and use the debugger to see what is null. – JG in SD Jan 31 '13 at 00:23

0 Answers0