Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
AnswerRe: Generic Collection vs ArrayList Pin
Paulo Zemek28-Oct-09 10:41
Paulo Zemek28-Oct-09 10:41 
AnswerRe: Generic Collection vs ArrayList Pin
PIEBALDconsult28-Oct-09 11:37
mvePIEBALDconsult28-Oct-09 11:37 
JokeRe: Generic Collection vs ArrayList Pin
Mycroft Holmes28-Oct-09 15:07
professionalMycroft Holmes28-Oct-09 15:07 
Questionthreading Pin
sajjy28-Oct-09 8:18
sajjy28-Oct-09 8:18 
AnswerRe: threading Pin
Paulo Zemek28-Oct-09 10:45
Paulo Zemek28-Oct-09 10:45 
QuestionThe specified network name is no longer available. Pin
DanielWehrle28-Oct-09 8:15
DanielWehrle28-Oct-09 8:15 
AnswerRe: The specified network name is no longer available. Pin
Paulo Zemek28-Oct-09 10:49
Paulo Zemek28-Oct-09 10:49 
QuestionNamed Pipe reading very slowly Pin
akhanal28-Oct-09 6:08
akhanal28-Oct-09 6:08 
AnswerRe: Named Pipe reading very slowly [modified] Pin
akhanal28-Oct-09 7:20
akhanal28-Oct-09 7:20 
GeneralRe: Named Pipe reading very slowly Pin
Paulo Zemek28-Oct-09 10:54
Paulo Zemek28-Oct-09 10:54 
GeneralRe: Named Pipe reading very slowly Pin
akhanal28-Oct-09 11:21
akhanal28-Oct-09 11:21 
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!)

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.