Any int extension methods
More...
|
static T | ToEnum< T > (this int val) |
| Casts an int to an enum More...
|
|
static T | ToEnum< T > (this int val, T defaultValue) |
| Casts a string to an enum More...
|
|
static bool | Between (this int val, int val1, int val2, bool includeLowerValue=true, bool includeUpperValue=true) |
| Determines if a More...
|
|
static string | ToMonthName (this int val, bool useAbbreviation=true) |
| Takes the month number and converts it to the name of the month More...
|
|
static string | ToQuarterName (this int val) |
| Takes the quarter number and converts it to the name of the quarter More...
|
|
static string | ToMonthYearName (this int val) |
| Takes the number corresponding to a month and year and converts it to the name More...
|
|
static string | ToQuarterYearName (this int val) |
| Takes the number corresponding to a quarter and year and converts it to the name More...
|
|
Any int extension methods
◆ Between()
static bool Sphyrnidae.Common.Extensions.IntExtensions.Between |
( |
this int |
val, |
|
|
int |
val1, |
|
|
int |
val2, |
|
|
bool |
includeLowerValue = true , |
|
|
bool |
includeUpperValue = true |
|
) |
| |
|
static |
Determines if a
- Parameters
-
val | The value being checked |
val1 | The lower limit |
val2 | The upper limit |
includeLowerValue | If true (default), then if the value == the lower value, this will return true |
includeUpperValue | If true (default), then if the value == the upper value, this will return true |
- Returns
◆ ToEnum< T >() [1/2]
static T Sphyrnidae.Common.Extensions.IntExtensions.ToEnum< T > |
( |
this int |
val | ) |
|
|
static |
Casts an int to an enum
- Template Parameters
-
- Parameters
-
val | The value of the enumeration to check |
- Returns
- The enumeration value
- Type Constraints
-
T | : | struct | |
T | : | IConvertible | |
◆ ToEnum< T >() [2/2]
static T Sphyrnidae.Common.Extensions.IntExtensions.ToEnum< T > |
( |
this int |
val, |
|
|
T |
defaultValue |
|
) |
| |
|
static |
Casts a string to an enum
- Template Parameters
-
- Parameters
-
val | The value of the enumeration to check |
defaultValue | If can not find a match, this will be returned |
- Returns
- The enumeration value
- Type Constraints
-
T | : | struct | |
T | : | IConvertible | |
◆ ToMonthName()
static string Sphyrnidae.Common.Extensions.IntExtensions.ToMonthName |
( |
this int |
val, |
|
|
bool |
useAbbreviation = true |
|
) |
| |
|
static |
Takes the month number and converts it to the name of the month
- Parameters
-
val | The value of the month (1-12) |
useAbbreviation | If true (default), this will return the abbreviated month name instead of the full month |
- Returns
- The month name
◆ ToMonthYearName()
static string Sphyrnidae.Common.Extensions.IntExtensions.ToMonthYearName |
( |
this int |
val | ) |
|
|
static |
Takes the number corresponding to a month and year and converts it to the name
- Parameters
-
val | The value of the month and year. Format is YYYYMM |
- Returns
- The month and year name
◆ ToQuarterName()
static string Sphyrnidae.Common.Extensions.IntExtensions.ToQuarterName |
( |
this int |
val | ) |
|
|
static |
Takes the quarter number and converts it to the name of the quarter
- Parameters
-
val | The value of the quarter (1-4) |
- Returns
- The quarter name
◆ ToQuarterYearName()
static string Sphyrnidae.Common.Extensions.IntExtensions.ToQuarterYearName |
( |
this int |
val | ) |
|
|
static |
Takes the number corresponding to a quarter and year and converts it to the name
- Parameters
-
val | The value of the quarter and year. Format is YYYYQQ |
- Returns
- The quarter and year name
The documentation for this class was generated from the following file:
- C:/Users/dougb/Desktop/Sphyrnidae/New/Common/Common/Extensions/IntExtensions.cs