Convert ObjectParameter to String in C# .Net

Last Reply on Aug 06, 2015 04:04 AM By dharmendr

Posted on Aug 06, 2015 02:10 AM

I am using the scope identity so that I take a object parameter like that 

  var OutputParmeter = new ObjectParameter("Id", typeof(int));

I declare it as  a  int because I use the data type in data base int now i send or return as a string so for that i have requried to convert it into string .

how I convert this object parameter to a string it is possible or not.please help me

Posted on Aug 06, 2015 04:04 AM

Hi hina,

Please refer the below article

https://social.msdn.microsoft.com/Forums/en-US/3ee89eb7-4664-46b5-8854-29a6444bd146/return-parameter-from-stored-procedure?forum=silverlightarchieve

You can use Convert.ToString() to convert the ObjectParameter to a string.

Hope this will help you.