Click here to Skip to main content
14,694,402 members
Home » Discussions » C#
   

C#

 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 2:16
MemberMohammad A Gdeisat4-Aug-08 2:16 
GeneralRe: Silly question - bool initialization in C# Pin
MarkB7774-Aug-08 2:48
MemberMarkB7774-Aug-08 2:48 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 2:50
MemberMohammad A Gdeisat4-Aug-08 2:50 
GeneralRe: Silly question - bool initialization in C# Pin
J4amieC4-Aug-08 3:20
MemberJ4amieC4-Aug-08 3:20 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 6:28
MemberMohammad A Gdeisat4-Aug-08 6:28 
AnswerRe: Silly question - bool initialization in C# Pin
Simon P Stevens4-Aug-08 2:13
MemberSimon P Stevens4-Aug-08 2:13 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 2:17
MemberMohammad A Gdeisat4-Aug-08 2:17 
AnswerRe: Silly question - bool initialization in C# Pin
User 66584-Aug-08 2:15
MemberUser 66584-Aug-08 2:15 
bool: false
int: 0


You can find more information in the C# language specification[^], section 5.2 Default values and especially section 4.1.2 Default constructors:


For all simple-types, the default value is the value produced by a bit pattern of all zeros:
For sbyte, byte, short, ushort, int, uint, long, and ulong, the default value is 0.
For char, the default value is '\x0000'.
For float, the default value is 0.0f.
For double, the default value is 0.0d.
For decimal, the default value is 0.0m.
For bool, the default value is false.


regards

modified 12-Sep-18 21:01pm.

GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 2:17
MemberMohammad A Gdeisat4-Aug-08 2:17 
AnswerRe: Silly question - bool initialization in C# Pin
#realJSOP4-Aug-08 4:25
mva#realJSOP4-Aug-08 4:25 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 6:30
MemberMohammad A Gdeisat4-Aug-08 6:30 
GeneralRe: Silly question - bool initialization in C# Pin
Paul Conrad4-Aug-08 7:09
professionalPaul Conrad4-Aug-08 7:09 
GeneralRe: Silly question - bool initialization in C# Pin
#realJSOP4-Aug-08 8:42
mva#realJSOP4-Aug-08 8:42 
AnswerRe: Silly question - bool initialization in C# Pin
Paul Conrad4-Aug-08 6:57
professionalPaul Conrad4-Aug-08 6:57 
Questionpaper size in pdf using c# Pin
ramyanaidu4-Aug-08 2:00
Memberramyanaidu4-Aug-08 2:00 
QuestionTest internet connection availability Pin
hadad4-Aug-08 1:41
Memberhadad4-Aug-08 1:41 
AnswerRe: Test internet connection availability [modified] Pin
#realJSOP4-Aug-08 2:05
mva#realJSOP4-Aug-08 2:05 
QuestionRendering application in inverse (negative) colors Pin
Bekjong4-Aug-08 0:11
MemberBekjong4-Aug-08 0:11 
AnswerRe: Rendering application in inverse (negative) colors Pin
Jaime Olivares4-Aug-08 0:37
MemberJaime Olivares4-Aug-08 0:37 
GeneralRe: Rendering application in inverse (negative) colors Pin
Bekjong4-Aug-08 2:28
MemberBekjong4-Aug-08 2:28 
GeneralRe: Rendering application in inverse (negative) colors Pin
Jaime Olivares4-Aug-08 2:40
MemberJaime Olivares4-Aug-08 2:40 
GeneralRe: Rendering application in inverse (negative) colors Pin
Bekjong4-Aug-08 2:52
MemberBekjong4-Aug-08 2:52 
GeneralRe: Rendering application in inverse (negative) colors Pin
Jaime Olivares4-Aug-08 3:01
MemberJaime Olivares4-Aug-08 3:01 
GeneralRe: Rendering application in inverse (negative) colors Pin
Bekjong4-Aug-08 3:07
MemberBekjong4-Aug-08 3:07 
AnswerRe: Rendering application in inverse (negative) colors Pin
Simon P Stevens4-Aug-08 2:17
MemberSimon P Stevens4-Aug-08 2:17 

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.