CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of UTC
C#
public static class TimeZoneInfoHelper
    {
        public static TimeSpan FindUtcOffsetByTimeZone(TimeZoneInfo timeZone)
        {
            var converted = FindCurrentDateTimeByTimeZoneInfo(timeZone);
 
            return converted.HasValue ? timeZone.GetUtcOffset(converted.Value) : TimeSpan.Zero;
        }
 
by Jason Rowe   March 28, 2011 @ 7:23pm
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
by Thom Lamb   May 19, 2010 @ 7:42am
329 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate