Int32.TryParse() or (int?)command.ExecuteScalar()

后端 未结 7 2253
既然无缘
既然无缘 2020-12-18 20:14

I have a SQL query which returns only one field - an ID of type INT.

And I have to use it as integer in C# code.

Which way is faster and uses less memory?

7条回答
提交回复
热议问题