Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27212

VS 2010 Calling method that returns Integer value without assignment?

$
0
0
I am not sure I chose the appropriate title, as I had a hard time coming up with a concise one. In any event my question is a simple one.

I am writing some ADO.NET code and something struck me as odd. Lets say I have the code below:

Code:

command.ExecuteNonQuery()
The ExecuteNonQuery method above has an Integer return value. I am able to however call it like I have above without having to set its return value to a variable. The compiler doesn't complain. Why is that?

Viewing all articles
Browse latest Browse all 27212


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>