Click here to Skip to main content
15,907,149 members
Home / Discussions / C#
   

C#

 
GeneralRe: Named Pipe reading very slowly Pin
Paulo Zemek29-Oct-09 1:11
Paulo Zemek29-Oct-09 1:11 
Question"View Only" mode for WebBrowser class? Pin
Matthew Klein28-Oct-09 6:03
Matthew Klein28-Oct-09 6:03 
AnswerRe: "View Only" mode for WebBrowser class? Pin
EliottA28-Oct-09 6:45
EliottA28-Oct-09 6:45 
GeneralRe: "View Only" mode for WebBrowser class? Pin
Matthew Klein28-Oct-09 7:50
Matthew Klein28-Oct-09 7:50 
GeneralRe: "View Only" mode for WebBrowser class? Pin
EliottA28-Oct-09 8:43
EliottA28-Oct-09 8:43 
QuestionDeveloping LogonUI With C# ? Pin
Sehlor28-Oct-09 4:27
Sehlor28-Oct-09 4:27 
AnswerRe: Developing LogonUI With C# ? Pin
Abhishek Sur28-Oct-09 5:19
professionalAbhishek Sur28-Oct-09 5:19 
Questionrelated to crystal report Pin
NarendraSinghJTV28-Oct-09 3:31
NarendraSinghJTV28-Oct-09 3:31 
AnswerRe: related to crystal report Pin
karthiknss29-Oct-09 22:42
karthiknss29-Oct-09 22:42 
GeneralRe: related to crystal report Pin
NarendraSinghJTV1-Nov-09 23:06
NarendraSinghJTV1-Nov-09 23:06 
QuestionNULLABLE type Pin
RINSON VARGHESE28-Oct-09 2:48
RINSON VARGHESE28-Oct-09 2:48 
AnswerRe: NULLABLE type Pin
Keith Barrow28-Oct-09 2:55
professionalKeith Barrow28-Oct-09 2:55 
AnswerRe: NULLABLE type Pin
Abhishek Sur28-Oct-09 3:31
professionalAbhishek Sur28-Oct-09 3:31 
AnswerRe: NULLABLE type Pin
Keith Barrow28-Oct-09 4:17
professionalKeith Barrow28-Oct-09 4:17 
OK, so my facecious comment wasn't so helpful.

Primitive types (int, bool etc) are not nullable, the classic exception to this is string, which can be set to null.

Objects of type object and derived from object are nullable. Nullable types allow null values on "primitive" types (they also have HasValue property):

i.e.

int foo = null; //Design time/ compile time error : assigning null to non-nullable primative type
int? bar = null; //OK
string baz = null; //OK, string is nullable.
string? quux = null; //Design time / compile time error : string is nullable
Nullable<string> foo1 = null; //Design time/ compile time error : string is nullable
object bar1 = null; //OK: Object nullable
MyClass baz1 = null; //OK: Object nullable as is an object.


Personally, I'd stear clear of nullable values where possible, as you will need to perpetually check the value is not null and other types of evil ensue.

CCC solved so far: 2 (including a Hard One!)

GeneralRe: NULLABLE type Pin
Abhishek Sur28-Oct-09 5:13
professionalAbhishek Sur28-Oct-09 5:13 
GeneralRe: NULLABLE type Pin
vtchris-peterson28-Oct-09 5:34
vtchris-peterson28-Oct-09 5:34 
GeneralRe: NULLABLE type Pin
Keith Barrow28-Oct-09 5:56
professionalKeith Barrow28-Oct-09 5:56 
GeneralRe: NULLABLE type Pin
Rick Shaub28-Oct-09 8:11
Rick Shaub28-Oct-09 8:11 
GeneralRe: NULLABLE type Pin
Keith Barrow28-Oct-09 14:38
professionalKeith Barrow28-Oct-09 14:38 
GeneralRe: NULLABLE type Pin
vtchris-peterson28-Oct-09 10:02
vtchris-peterson28-Oct-09 10:02 
GeneralRe: NULLABLE type Pin
Keith Barrow28-Oct-09 14:25
professionalKeith Barrow28-Oct-09 14:25 
GeneralRe: NULLABLE type Pin
vtchris-peterson28-Oct-09 14:53
vtchris-peterson28-Oct-09 14:53 
GeneralRe: NULLABLE type Pin
Keith Barrow29-Oct-09 0:17
professionalKeith Barrow29-Oct-09 0:17 
GeneralRe: NULLABLE type Pin
vtchris-peterson29-Oct-09 4:10
vtchris-peterson29-Oct-09 4:10 
GeneralRe: NULLABLE type Pin
Keith Barrow29-Oct-09 5:14
professionalKeith Barrow29-Oct-09 5:14 

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.