|
-
Mar 15th, 2004, 05:04 PM
#1
Thread Starter
Lively Member
Void Process to bool
Hello Everybody:
Can any one tell me how to convert a Void Process to bool.. Pls guide...
if (ClientProcess()=true)
{
}
Thanks,
Rahil
-
Mar 15th, 2004, 06:27 PM
#2
Lively Member
First off... you need to use == instead of one =.
Visual Studio .net 2003 EA
VB .net
C#
-
Mar 16th, 2004, 04:25 AM
#3
Frenzied Member
If its a void method then its not returning a value. Therefore you need to change the method:
e.g.
public void ClientProcess()
to
public bool ClientProcess()
you also need to add return statements throughout the method to ensure a result (of type bool) is returned.
HTH
DJ
-
Mar 18th, 2004, 05:43 AM
#4
Code:
public bool ClientProcess()
{
if(whatever)
return true;
else
return false;
}
//......................
if(ClientProcess()) //assumes true
{
//??? code if true
}
else //if it was false...
{
//??? code if false
}
Last edited by wossname; Mar 18th, 2004 at 05:46 AM.
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|