Manish Jain

Manish Jain

  • NA
  • 7
  • 0

passing null for an integer argument

Dec 24 2009 5:23 AM
Hi,
     I have developed a web service in c# which takes a parameter as integer type, but when i call it without passing any value it gives an error which is natural because it cannot convert null into int32 type.

Is there any way i can call this webservice an return a personal error message to the client if he calls the service without passing any value as argument.

I tried to change the int type to int? in the function definition but still i am having the problem , is there any other way?

Hope to get a reply soon.

Thanks,
Jain

Answers (6)