Skip to content

.NET Notes

public static DateTime ToCentralTime(this string dateTimeString)
{
TimeZoneInfo centralTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");
return DateTime.TryParse(dateTimeString, out DateTime dt) ? TimeZoneInfo.ConvertTimeFromUtc(dt, centralTimeZone) : DateTime.MinValue;
}
public static DateTime ToCentralTime(this DateTimeOffset dateTime)
{
TimeZoneInfo centralTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");
return TimeZoneInfo.ConvertTime(dateTime, centralTimeZone).DateTime;
}

System.Collections.Generic Interface Properties and Methods

Section titled “System.Collections.Generic Interface Properties and Methods”
IEnumerableIEnumerable<T>ICollection<T>IList<T>
CurrentXXXX
MoveNext()XXXX
Reset()XXXX
GetEnumerator()XXXX
CountXX
IsReadOnlyXX
Add(T)XX
Clear()XX
Contains(T)XX
CopyTo(T[], idx)XX
Remove(T)XX
this[idx]X
IndexOf(T)X
Insert(idx, T)X
RemoveAt(idx)X