This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!System.Diagnostics.Debugger.IsAttached) | |
| { | |
| this.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException); | |
| AppDomain.CurrentDomain.UnhandledException += this.CurrentDomain_UnhandledException; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public virtual string[] _ParseCsvFormat(string value) | |
| { | |
| //var regexstr = @"(?:(?:""(?<m>[^""]*?,[^""]*?)""|(?<m>[^,]*)))(?:,|$)"; | |
| var regexstr = @" | |
| (?: | |
| (?: | |
| "" | |
| (?<m>[^""]*?,[^""]*?) | |
| "" | |
| | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [DebuggerDisplay("\\{ Name = {Name}, Age = {Age} \\}")] | |
| private sealed struct X : IEquatable<X> | |
| { | |
| private readonly string name; | |
| private readonly int age; | |
| public X(string name, int age) | |
| { | |
| this.name = name; | |
| this.age = age; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.Settings | |
| Designer.SettingsSingleFileGenerator", "10.0.0.0")] | |
| internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { | |
| private static Settings defaultInstance = ((Settings)(global::System.Configuration.Applicati | |
| onSettingsBase.Synchronized(new Settings()))); | |
| public static Settings Default { | |
| get { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class ListExt //for List<> and IList<> | |
| { | |
| public static IList<T> Swap<T>(this IList<T> source, int oldIndex, int newIndex) | |
| { | |
| var temp = source[oldIndex]; | |
| source[oldIndex] = source[newIndex]; | |
| source[newIndex] = temp; | |
| return source; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// breadth first traversal | |
| /// </summary> | |
| /// <typeparam name="T"></typeparam> | |
| /// <param name="root"></param> | |
| /// <param name="childrenSelector"></param> | |
| /// <returns></returns> | |
| public static IEnumerable<T> Traverse<T>(this T root, Func<T,IEnumerable<T>> childrenSelector) | |
| { | |
| yield return root; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| On 11/11/2011 8:05 AM, vince wrote: | |
| > On Fri, 11 Nov 2011 07:09:23 -0500, Bill_MI <bill@mi.no.spam.ath.cx> | |
| > wrote: | |
| > | |
| >> An interesting read from opposing sides: | |
| >> | |
| >> https://bugs.launchpad.net/unity/+bug/882274 | |
| >> | |
| >> This is NOT to start a discussion thread but to make people aware. | |
| >> All political comments will be ignored. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class ThingsThatAreNotAGoodIdeaThatIDoAnyway | |
| { | |
| public static void IgnoreExceptions(this System.Threading.Tasks.Task task) | |
| { | |
| task.ContinueWith(t => t.Exception.Handle(e => true), System.Threading.Tasks.TaskContinuationOptions.OnlyOnFaulted); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Windows; | |
| using System.Windows.Controls; | |
| using System.Windows.Data; | |
| using System.Windows.Documents; | |
| using System.Windows.Input; | |
| using System.Windows.Media; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://mobile.tutsplus.com/tutorials/iphone/ios-5-sdk-storyboards/ |