My Boss give me a project and say read it Compleatly in this Project there is Class Called CaspolSecurityPolicyCreator.cs i serach it on net but did not Found any help can any body tell me why we use it. The Project is Of add-on on Outlook
Although I've been programming for years but I need somebody to explicitly assure me that I am correct as I am developing a critical piece of software. The problem is that when you need a very basic rule you cannot find it on search engines
when I define a variable of bool like this:
is it automatically initialized to false?
what about int? is it automatically initialized to zero?
And ever has it been that love knows not its own depth until the hour of separation
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.
Never assume that a variable is automatically initialized. If you want it set to false, then set the damn thing to false.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001