|
-
Apr 15th, 2005, 08:19 PM
#1
-
Apr 15th, 2005, 08:57 PM
#2
Fanatic Member
Re: overloading true and false operators?
Don't know really if we can overload it, provided that they have the same type (of type bool). Just go for a condition.
VB Code:
class test
{
bool boolean;
public test(bool boolean)
{
if(boolean) true_statement();
else false_statement();
}
void true_statement(){}
void false_statement(){}
}
-
Apr 15th, 2005, 09:35 PM
#3
Re: overloading true and false operators?
this is what I meant
public static bool operator true (myClass val)
{
return true;
}
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 15th, 2005, 09:47 PM
#4
Fanatic Member
Re: overloading true and false operators?
Oppss.
Yes, you're right. Can't seem to find a good example why true/false operator is overloaded.
-
Apr 15th, 2005, 09:54 PM
#5
Fanatic Member
Re: overloading true and false operators?
Just found this. Don't really understand it coz I don't really understand English well. But hopes this might have a use for you.
-
Apr 15th, 2005, 09:57 PM
#6
Re: overloading true and false operators?
hmmmmmmmmmmmmmm
thanks, but I still dont understand it
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
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
|