Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 14, 2012 10:22 AM by DMW
Mar 13, 2012 01:36 PM|LINK
I have a method which returns 1 or 0 after some transactions. I wonder if there is a way to return 1 or 0 before the transactions? The reason is because there is a mechanism that waits for this return value and it is more important than the transaction itself.
Mar 13, 2012 01:39 PM|LINK
In your if statement try to use return; Return will exit the method at that point without running any more code.
bool isTrue = false;
if (1 == 1)
if (2+1 == 3)
isTrue = true;
isTrue = false;
Mar 13, 2012 02:04 PM|LINK
I am sorry but I did not understand what you mean?
This is my sample method:
Public Function retDrawProgram(ByVal dsDrawProgram As System.Data.DataSet, ByVal sDrawNumber As String, ByVal sDataRevision As String) As String
//Here is my transactions
How can I return 1 before transactions?
Mar 14, 2012 10:22 AM|LINK
You will need to do some asynchronous programming if you the method to return a value prior to the transactions being done.
Google/Bing on Task(Of T) for a mechanism that can do this.