Click here to Skip to main content
15,896,269 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with Textbox Pin
Roberto Ho13-Apr-09 2:03
Roberto Ho13-Apr-09 2:03 
QuestionDetermine whether connected to the internet. Pin
kippow12-Apr-09 13:58
kippow12-Apr-09 13:58 
AnswerRe: Determine whether connected to the internet. Pin
Luc 64801112-Apr-09 14:47
Luc 64801112-Apr-09 14:47 
QuestionQuestion about DirectX.Sound. Pin
t.s.al-zahrani12-Apr-09 12:52
t.s.al-zahrani12-Apr-09 12:52 
AnswerRe: Question about DirectX.Sound. Pin
Mycroft Holmes12-Apr-09 14:47
professionalMycroft Holmes12-Apr-09 14:47 
QuestionCan operators be overloaded for built-in value types Pin
Winkles12-Apr-09 12:19
Winkles12-Apr-09 12:19 
AnswerRe: Can operators be overloaded for built-in value types Pin
Colin Angus Mackay12-Apr-09 12:43
Colin Angus Mackay12-Apr-09 12:43 
AnswerRe: Can operators be overloaded for built-in value types Pin
DaveyM6912-Apr-09 20:53
professionalDaveyM6912-Apr-09 20:53 
The previous advice was correct, you can't change or derive from the built in types such as Int32. You can however provide a wrapper around them, for example:
public class MyInt32
{
    private Int32 _Value;
    private MyInt32(Int32 value)
    {
        _Value = value;
    }
    public static implicit operator Int32(MyInt32 value)
    {
        return value._Value;
    }
    public static implicit operator MyInt32(Int32 value)
    {
        return new MyInt32(value);
    }
    public static MyInt32 operator ^(MyInt32 valueA, MyInt32 valueB)
    {
        //return new MyInt32(valueA._Value ^ valueB._Value);
        // your logic below
        return 8;
    }
}
Now just make sure one of the values is an MyInt32 and your implemtation will be used
MyInt32 a = 2;
MyInt32 b = 3;
// any of these three will call your implementation
Console.WriteLine(a ^ 3);
Console.WriteLine(2 ^ b);
Console.WriteLine(a ^ b);


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)

QuestionMaximize Problem in MDI Form. Pin
hdv21212-Apr-09 10:49
hdv21212-Apr-09 10:49 
AnswerRe: Maximize Problem in MDI Form. Pin
sajid.salim.khan12-Apr-09 18:32
sajid.salim.khan12-Apr-09 18:32 
GeneralRe: Maximize Problem in MDI Form. Pin
hdv21213-Apr-09 9:24
hdv21213-Apr-09 9:24 
Questionmonitor.pulse Pin
kyus9412-Apr-09 9:38
kyus9412-Apr-09 9:38 
AnswerRe: monitor.pulse Pin
Nicholas Butler12-Apr-09 9:47
sitebuilderNicholas Butler12-Apr-09 9:47 
GeneralRe: monitor.pulse Pin
ykcontact22-Apr-09 5:08
ykcontact22-Apr-09 5:08 
GeneralRe: monitor.pulse Pin
Nicholas Butler22-Apr-09 5:30
sitebuilderNicholas Butler22-Apr-09 5:30 
QuestionDesigning form Pin
Rajdeep.NET is BACK12-Apr-09 8:52
Rajdeep.NET is BACK12-Apr-09 8:52 
QuestionSending byte array(data) to a URL with POST or GET Pin
Member 441789212-Apr-09 6:57
Member 441789212-Apr-09 6:57 
AnswerRe: Sending byte array(data) to a URL with POST or GET Pin
harold aptroot12-Apr-09 7:09
harold aptroot12-Apr-09 7:09 
GeneralRe: Sending byte array(data) to a URL with POST or GET Pin
Member 441789212-Apr-09 7:17
Member 441789212-Apr-09 7:17 
GeneralRe: Sending byte array(data) to a URL with POST or GET Pin
harold aptroot12-Apr-09 7:43
harold aptroot12-Apr-09 7:43 
AnswerRe: Sending byte array(data) to a URL with POST or GET Pin
Luc 64801112-Apr-09 8:23
Luc 64801112-Apr-09 8:23 
GeneralRe: Sending byte array(data) to a URL with POST or GET Pin
Member 441789212-Apr-09 9:10
Member 441789212-Apr-09 9:10 
GeneralRe: Sending byte array(data) to a URL with POST or GET Pin
Luc 64801112-Apr-09 9:33
Luc 64801112-Apr-09 9:33 
Questionthreading question Pin
Rafone12-Apr-09 6:45
Rafone12-Apr-09 6:45 
AnswerRe: threading question Pin
Luc 64801112-Apr-09 7:05
Luc 64801112-Apr-09 7:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.