Click or drag to resize

Utils_Other Methods

The Utils_Other type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAdd(DateTime, Int32, Int32, Int32, Int32)
Adds the specified days, hours, minutes and seconds to the given date.
Public methodStatic memberAdd(DateTimeOffset, Int32, Int32, Int32, Int32)
Adds the specified days, hours, minutes and seconds to the given date.
Public methodStatic memberAsT
Casts an object to another type. Returns default(T) if the object is null.
Public methodStatic memberCompareVersions
Compares the versions.
Public methodStatic memberConvertArrayToStringCollection
Converts an array of strings to a StringCollection.
Public methodStatic memberConvertToUnsecureString
Gets an unsecured string from a secured string.
Public methodStatic memberCreateGetMethod
Creates a dynamic getter for the property. https://jachman.wordpress.com/2006/08/22/2000-faster-using-dynamic-method-calls/
Public methodStatic memberCreateSetMethod
Creates a dynamic setter for the property. https://jachman.wordpress.com/2006/08/22/2000-faster-using-dynamic-method-calls/
Public methodStatic memberCreateValueTKey, TValue
Creates a new instance of TValue and add it in the dictionary for the specified key.
Public methodStatic memberEnsureValueTKey, TValue
Ensures that the value for the specified key is the given value.
Public methodStatic memberEqualsAll
Checks that this object is equal to every object in parameters.
Public methodStatic memberEqualsAny
Checks that this object is equal to at least one of the parameters.
Public methodStatic memberGetAssembky(String, String)

Gets an assembly from a folder.

This method cannot be used to load Utils (current assembly).

This assembly must be in default bin or in GAC.

Public methodStatic memberGetAssembky(String, String, String)

Gets an assembly from a folder.

This method cannot be used to load Utils (current assembly).

This assembly must be in default bin or in GAC.

Public methodStatic memberGetCleanSegments
Gets an URI's segments, splitted with more characters. "/" is trimmed.
Public methodStatic memberGetCompleteTextFromHours
Converts a number of hours to a number of days, given a certain amount of hours per day.

This method returns a textual representation '[X] days ([val] hours)'.

Public methodStatic memberGetConstants
Public methodStatic memberGetDateForBdd
Returns a DateTime that can't be prior to 1/1/1970.
Public methodStatic memberGetDaysFromHours
Converts a number of hours to a number of days, given a certain amount of hours per day.
Public methodStatic memberGetDaysFromHours_Text
Converts a number of hours to a number of days, given a certain amount of hours per day.

This method returns a text.

Public methodStatic memberGetDbValue(NullableBoolean)
Gets the value if available, else returns false.
Public methodStatic memberGetDbValue(NullableDateTime)
Gets the value if available, else returns DateTime.MinValue.
Public methodStatic memberGetDbValue(NullableDouble)
Gets the value if available, else returns 0.
Public methodStatic memberGetDbValue(NullableInt32)
Gets the value if available, else returns 0.
Public methodStatic memberGetEnumGuid
Using the EnumGuid attribute, gets the guid associated to an enum.
Public methodStatic memberGetFieldsAttributeAttributeType
Gets all attributes of a given type associated to a field on the specified type.
Public methodStatic memberGetFileVersion
Gets the file version of an assembly.
Public methodStatic memberGetLoadableTypes
Gets loadable types of the assembly. Types that cannot be loaded will be ignored.
Public methodStatic memberGetOrCreateValueTKey, TValue(DictionaryTKey, TValue, TKey)
Tries to find the value associated with the given key.

If not found, creates a new instance of TValue and add it in the dictionary for the specified key.

Public methodStatic memberGetOrCreateValueTKey, TValue(DictionaryTKey, TValue, TKey, FuncTValue)
Tries to find the value associated with the given key.

If not found, uses [valueCreatorIfNotExists] to add the value in the dictionary for the specified key.

Public methodStatic memberGetOrCreateValueTKey, TValue(DictionaryTKey, TValue, TKey, TValue)
Tries to find the value associated with the given key.

If not found, adds [valueIfNotExists] in the dictionary for the specified key.

Public methodStatic memberGetProcessOwner
Gets the user name owning/running a given process. If there are multiple process with the same name, only the first owner is returned.
Public methodStatic memberGetPropertiesAttributeType
Gets all properties associated to a given type of attribute on the specified type.
Public methodStatic memberGetPropertiesAttributesAttributeType
Gets all attributes of a given type associated to a property on the specified type.
Public methodStatic memberGetRandomDay
Gets a random day.
Public methodStatic memberGetString
Converts an object to String using ToString() method, else returns String.Empty.
Public methodStatic memberGetValueTKey, TValue
Gets the value associated with the specified key.
Public methodStatic memberInT(T, IEnumerableT)
Checks if a value is equal to any other specified value in the list.
Public methodStatic memberInT(T, T)
Checks if a value is equal to any other specified value.
Public methodStatic memberIsNotNullOrEmpty
Checks if a guid is NOT null or empty.
Public methodStatic memberIsNullOrEmpty
Checks if a guid is null or empty.
Public methodStatic memberIsNumber
Checks if an object if of any of these types : sbyte, byte, short, ushort, int, uint, long, ulong, float, double, decimal.
Public methodStatic memberIsProcessRunning
Determines whether the specified process is running.
Public methodStatic memberIsStatic
Checks if a type is static. (uses IsAbstract and IsSealed conditions)
Public methodStatic memberIsSubclassOfRawGeneric
Checks if a type inherits from another one, even if the class is generic.
Public methodStatic memberMergeArrays(String)
Merges multiple arrays into a single array.
Public methodStatic memberMergeArraysT(T)
Merges multiple arrays into a single array.
Public methodStatic memberSmartConcat
Concatanates multiple strings into a single string, using the specified separator.
Public methodStatic memberSmartConcatObjects
Concatanates multiple objects into a single string, using the specified separator.
Public methodStatic memberToStringCollection
Converts a list of strings to a StringCollection.
Public methodStatic memberTryGetValueTKey, TValue
Gets the value associated with the specified key.
Public methodStatic memberTryLoadAssemblyByFullName
Tries to load an assembly given the long form of its name.
Top
See Also