V
vishal
hi dear
i am working on .net(1.1) web service and due to delay in response i made it multi threaded
but when i passed a object in function which is called on a new thread, it is throwing ObjectNullReference exception...
because it is unable to get value from the property of that object....
but by looking in quickwatch the state of object where it is throwing that exception
all the private member of object are having there values but in value column of quickwatch window
it is showing "error : cannot obtain value" against each and every public member.
i am giving you the source code how i am doing multi threading...
public class Threading
{
Testing testing = new Testing(PassedObject obj);
ThreadStart threadStart=new ThreadStart(testing.PerFormSomeAction);
Thread thread=new Thread(threadStart);
thread.Start();
}
public class Testing
{
private PassedObject _obj;
public void testing(PassedObject obj_)
{
this._obj=obj_;
}
public void PerformSomeAction()
{
// code here
// it is showing error here while accessing some of the property of _obj.
// but by using quickwatch it is showing value of private member's and displaying "error:cannot obtain value" for public members..
}
}
please help in the matter..
a kind reply is awaited
reply to : (e-mail address removed)
(e-mail address removed)
regards
vishal
i am working on .net(1.1) web service and due to delay in response i made it multi threaded
but when i passed a object in function which is called on a new thread, it is throwing ObjectNullReference exception...
because it is unable to get value from the property of that object....
but by looking in quickwatch the state of object where it is throwing that exception
all the private member of object are having there values but in value column of quickwatch window
it is showing "error : cannot obtain value" against each and every public member.
i am giving you the source code how i am doing multi threading...
public class Threading
{
Testing testing = new Testing(PassedObject obj);
ThreadStart threadStart=new ThreadStart(testing.PerFormSomeAction);
Thread thread=new Thread(threadStart);
thread.Start();
}
public class Testing
{
private PassedObject _obj;
public void testing(PassedObject obj_)
{
this._obj=obj_;
}
public void PerformSomeAction()
{
// code here
// it is showing error here while accessing some of the property of _obj.
// but by using quickwatch it is showing value of private member's and displaying "error:cannot obtain value" for public members..
}
}
please help in the matter..
a kind reply is awaited
reply to : (e-mail address removed)
(e-mail address removed)
regards
vishal