Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to capture Skype voice communication by C# program using win32 function Pin
Pete O'Hanlon29-Apr-14 4:23
mvePete O'Hanlon29-Apr-14 4:23 
GeneralRe: How to capture Skype voice communication by C# program using win32 function Pin
Tridip Bhattacharjee29-Apr-14 20:58
professionalTridip Bhattacharjee29-Apr-14 20:58 
GeneralRe: How to capture Skype voice communication by C# program using win32 function Pin
Pete O'Hanlon29-Apr-14 21:38
mvePete O'Hanlon29-Apr-14 21:38 
GeneralRe: How to capture Skype voice communication by C# program using win32 function Pin
Tridip Bhattacharjee30-Apr-14 4:26
professionalTridip Bhattacharjee30-Apr-14 4:26 
QuestionA Query regarding Nullable types in C# PinPopular
Agent__00728-Apr-14 20:24
professionalAgent__00728-Apr-14 20:24 
AnswerRe: A Query regarding Nullable types in C# Pin
OriginalGriff28-Apr-14 20:47
mveOriginalGriff28-Apr-14 20:47 
GeneralRe: A Query regarding Nullable types in C# Pin
Rob Philpott28-Apr-14 23:30
Rob Philpott28-Apr-14 23:30 
AnswerRe: A Query regarding Nullable types in C# Pin
Kornfeld Eliyahu Peter28-Apr-14 20:54
professionalKornfeld Eliyahu Peter28-Apr-14 20:54 
As you fully understand when creating int? you actually creates a Nullable<int>, which is a structure that actually never null. In fact it has a value member that actually holds the value - that can be null.
Now, when you call ToString you call an overridden version, that has this code:
C#
public override string ToString()
{
  if (!this.HasValue)
  {
    return "";
  }
  return this.value.ToString();
}

That explains why it works even you had expected a null reference exception...
With GetType is a different story, it is derived from object and never overridden by Nullable<t>, so it will be executed on the internal value which is null, therefor it fails!
(GetHashCode and Equals are also overridden)
You may use some decompiler to see the whole class...)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

GeneralRe: A Query regarding Nullable types in C# Pin
Agent__00728-Apr-14 21:03
professionalAgent__00728-Apr-14 21:03 
GeneralRe: A Query regarding Nullable types in C# Pin
OriginalGriff28-Apr-14 21:15
mveOriginalGriff28-Apr-14 21:15 
GeneralRe: A Query regarding Nullable types in C# Pin
Agent__00728-Apr-14 21:27
professionalAgent__00728-Apr-14 21:27 
AnswerRe: A Query regarding Nullable types in C# Pin
Rob Philpott28-Apr-14 23:28
Rob Philpott28-Apr-14 23:28 
GeneralRe: A Query regarding Nullable types in C# Pin
Agent__00728-Apr-14 23:50
professionalAgent__00728-Apr-14 23:50 
QuestionC# webcam video recording Please Help me! Pin
Member 1078092828-Apr-14 7:44
Member 1078092828-Apr-14 7:44 
AnswerRe: C# webcam video recording Please Help me! Pin
OriginalGriff28-Apr-14 8:05
mveOriginalGriff28-Apr-14 8:05 
Question"Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
Member 1059173628-Apr-14 7:22
Member 1059173628-Apr-14 7:22 
AnswerRe: "Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
OriginalGriff28-Apr-14 8:02
mveOriginalGriff28-Apr-14 8:02 
GeneralRe: "Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
Member 1059173628-Apr-14 9:11
Member 1059173628-Apr-14 9:11 
AnswerRe: "Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
OriginalGriff28-Apr-14 9:28
mveOriginalGriff28-Apr-14 9:28 
GeneralRe: "Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
Member 1059173628-Apr-14 20:46
Member 1059173628-Apr-14 20:46 
GeneralRe: "Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
OriginalGriff28-Apr-14 21:12
mveOriginalGriff28-Apr-14 21:12 
GeneralRe: "Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
Dave Kreskowiak28-Apr-14 9:31
mveDave Kreskowiak28-Apr-14 9:31 
GeneralRe: "Attempted to divide by zero" Exception occuring in "Audio Steganography" in c# Pin
Pete O'Hanlon29-Apr-14 0:29
mvePete O'Hanlon29-Apr-14 0:29 
QuestionHow can I dictate the position of the run prompt? Pin
turbosupramk328-Apr-14 3:38
turbosupramk328-Apr-14 3:38 
AnswerRe: How can I dictate the position of the run prompt? Pin
Dave Kreskowiak28-Apr-14 9:28
mveDave Kreskowiak28-Apr-14 9:28 

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.