StaticExtensions 1.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package StaticExtensions --version 1.0.2
NuGet\Install-Package StaticExtensions -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StaticExtensions" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StaticExtensions --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: StaticExtensions, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install StaticExtensions as a Cake Addin #addin nuget:?package=StaticExtensions&version=1.0.2 // Install StaticExtensions as a Cake Tool #tool nuget:?package=StaticExtensions&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
StaticExtensions
- Extensions for all
public static string MMCommonsFolder() { return "C:\\ProgramData\\MMCommons"; }
public static string AppExeFolder(){ return MMConLocation() + "\\"; }
public static string MMConLocation() -- wrapper around Application.CommonAppDataPath backing up and adding "MMCommons";
#region object exts
public static bool IsNull(this object obj)
public static bool AsBool(this object obj)
public static string AsString(this object obj)
public static int AsInt(this object obj)
public static long AsLong(this object obj)
public static DateTime AsDateTime(this object obj)
public static Double AsDouble(this object obj)
public static Decimal AsDecimal(this object obj)
public static string AsJson(this object obj)
#region Parse strings
public static int ParseCount(this string content, string delims)
public static string ParseString(this string content, string delims, int take)
public static string ParseFirst(this string content, string delims)
public static string ParseLast(this string content, string delims)
public static string ParseReverse(this string content, string delims, string concatString)
public static string AddQuotes(this string content)
public static string AddQuote(this string content)
public static string RemoveChar(this string content, char CToRemove)
public static decimal AsDecimal(this string obj)
public static string LTrim(this string content, char c)
#region Date to string with popular time formats.
public static string AsStrDate(this DateTime x)
public static string AsStrDateTime12H(this DateTime x)
public static string AsStrDateTime24H(this DateTime x)
public static string AsStrTime(this DateTime x)
public static string AsStrDateHHMM(this DateTime x)
public static string AsStrDay(this DateTime x)
#region Double
public static Int32 AsInt32(this double x)
public static Int32 AsInt32T(this double x)
public static string AsStr2P(this double x)
public static string AsStr2P(this double x, Int32 toHowManyPlaces, char paddingChar = ' ')
public static string AsStr4P(this double x)
public static string AsStr4P(this double x, Int32 toHowManyPlaces, char paddingChar = ' ')
public static string AsStr8P(this double x)
public static string AsStr8P(this double x, Int32 toHowManyPlaces, char paddingChar = ' ')
public static decimal AsDecimal(this double x)
public static double AsPointsVertical(this double dIn)
public static double AsPointsHorizontal(this double dIn)
#region Decimal
public static float AsFloat(this decimal x)
public static int AsInt(this decimal x)
public static int AsIntT(this decimal x)
public static string AsStr2P(this decimal x)
public static string AsStr2P(this decimal x, Int32 toHowManyPlaces, char paddingChar = ' ')
public static string AsStr4P(this decimal x)
public static string AsStr4P(this decimal x, Int32 toHowManyPlaces, char paddingChar = ' ')
public static string AsStr8P(this decimal x)
public static string AsStr8P(this decimal x, Int32 toHowManyPlaces, char paddingChar = ' ')
public static double AsDouble(this decimal x)
#region cryptish masks
// variant uses ? as fillers instead of = for base64 in inifiles.
public static string AsBase64Encoded(this string Text)
public static string AsBase64Decoded(this string Text)
public static string AsHexStr(this byte[] byteArray)
public static byte[] AsByteArray(this string hexString)
public static string AsFiletoMD5(string filePath)
#region exceptions
public static string AsWalkExcTreePath(this Exception e)
public static Exception WriteAppLog(this Exception e, string messageString)
public static void WriteToAppLog(this string messageString)
public static string WriteToTextFile(this string stringToWrite, string logFileName)
public static string WriteToTextFileLine(this string stringToWrite, string logFileName)
public static Exception WriteToLogException(this Exception e, string logFileNamePart)
#region Images
public static Regex r = new Regex(":");
//retrieves the datetime WITHOUT loading the whole image
public static DateTime GetDateTakenFromImage(this string path)
// GetColors by Matt Meents, creates const foreach ARGB and then sum out the colors...
public static Color[] GetColors(Color fromColor, Color toColor, int howMany)
#endregion
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net35 is compatible. net40 was computed. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 3.5
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on StaticExtensions:
Package | Downloads |
---|---|
AppCrypto
Reusable Helpers and Cuncurrent Dictionaries and IniFile |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial Release.