Show / Hide Table of Contents

Class MagicBooleans

This class defines frequently used Boolean values whose correct values are easier to remember with the help of a mnemonic.

This class is one of a constellation of static classes that define a wide variety of symbolic constants that I use to make my code easier to understand when I need a refresher or am about to change it.

Inheritance
System.Object
MagicBooleans
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: WizardWrx
Assembly: WizardWrx.Common.dll
Syntax
public static class MagicBooleans
Remarks

The constants defined herein are pairs. The first part of the name of each pair associates it with the method or constructor with which it is intended to be used. The remainder of the name identifies the behavior elicited from the object or method by specifying this value.

Fields

| Improve this Doc View Source

ENUM_PARSE_CASE_INSENSITIVE

Use this constant as the third (ignoreCase) argument of the static Enum.Parse method to cause the evaluation to be case INsensitive.

Declaration
public const bool ENUM_PARSE_CASE_INSENSITIVE = true
Field Value
Type Description
System.Boolean
See Also
ENUM_PARSE_CASE_SENSITIVE
| Improve this Doc View Source

ENUM_PARSE_CASE_SENSITIVE

Use this constant as the third (ignoreCase) argument of the static Enum.Parse method to cause the evaluation to be case sensitive. This is the default behavior of Enum.Parse exhibited by the two-argument overload of this method.

Declaration
public const bool ENUM_PARSE_CASE_SENSITIVE = false
Field Value
Type Description
System.Boolean
See Also
ENUM_PARSE_CASE_INSENSITIVE
| Improve this Doc View Source

FILE_COPY_OVERWRITE_FORBIDDEN

Use with the third argument of the static Copy method of the File class to explicitly forbid file overwriting. See Remarks.

Declaration
public const bool FILE_COPY_OVERWRITE_FORBIDDEN = false
Field Value
Type Description
System.Boolean
Remarks

If you NEVER want overwriting, use the default (two-argument) form of the Copy method.

See Also
FILE_COPY_OVERWRITE_PERMITTED
| Improve this Doc View Source

FILE_COPY_OVERWRITE_PERMITTED

Use with the third argument of the static Copy method of the File class to enable file overwriting, which is forbidden by default.

Declaration
public const bool FILE_COPY_OVERWRITE_PERMITTED = true
Field Value
Type Description
System.Boolean
See Also
FILE_COPY_OVERWRITE_FORBIDDEN
| Improve this Doc View Source

FILE_OUT_APPEND

Use this symbolic constant to set the append argument to an overloaded StreamWriter constructor, to cause it to append to a file if one exists.

Declaration
public const bool FILE_OUT_APPEND = true
Field Value
Type Description
System.Boolean
See Also
FILE_OUT_CREATE
| Improve this Doc View Source

FILE_OUT_CREATE

Use this symbolic constant to set the append argument to an overloaded StreamWriter constructor, to cause it to overwrite a file if one exists.

Declaration
public const bool FILE_OUT_CREATE = false
Field Value
Type Description
System.Boolean
See Also
FILE_OUT_APPEND
| Improve this Doc View Source

MAKE_STREAM_IO_ASYNCHRONOUS

Use this symbolic constant to set the useAsync argument to a FileStream constructor to TRUE, allowing I/O to be asynchronous.

Declaration
public const bool MAKE_STREAM_IO_ASYNCHRONOUS = true
Field Value
Type Description
System.Boolean
See Also
MAKE_STREAM_IO_SYNCHRONOUS
| Improve this Doc View Source

MAKE_STREAM_IO_SYNCHRONOUS

Use this symbolic constant to set the useAsync argument to a FileStream constructor to FALSE, allowing I/O to be synchronous, which is the default.

Declaration
public const bool MAKE_STREAM_IO_SYNCHRONOUS = false
Field Value
Type Description
System.Boolean
See Also
MAKE_STREAM_IO_ASYNCHRONOUS

See Also

ArrayInfo
ListInfo
FileIOFlags
PathPositions
SpecialCharacters
  • Improve this Doc
  • View Source
Back to top Generated by DocFX