Format:
Recent snippets matching tags of UTC
public static class TimeZoneInfoHelper { public static TimeSpan FindUtcOffsetByTimeZone(TimeZoneInfo timeZone) { var converted = FindCurrentDateTimeByTimeZoneInfo(timeZone); return converted.HasValue ? timeZone.GetUtcOffset(converted.Value) : TimeSpan.Zero; }
84 Views
no comments
<Extension()> _ Public Function GetBindingInfo(ByVal DataLayoutControl As DataLayoutControl, _ Optional ByVal ExcludePropetries As String = "") As List(Of DataLayoutBindingInfo) Dim bh As New LayoutElementsBindingInfoHelper(DataLayoutControl) Dim info As LayoutElementsBindingInfo = bh.CreateDataLayoutElementsBindingInfo GetBindingInfo = (From x As LayoutElementBindingInfo In info.GetAllBindings _ Where (Not x.DataInfo.Name.ToUpper.EqualsAny(ExcludeNames)) _ And (Not x.DataInfo.Name.ToUpper.EqualsAny(ExcludePropetries)) _ Select New DataLayoutBindingInfo(x.DataInfo.Name, x.DataInfo.Caption, x.Visible, x.EditorType)).ToList End Function
329 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
