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
// Sketch your next great idea! | |
using System; | |
using Xamarin.Forms; | |
var box = new BoxView(){Color = Color.Blue}; | |
var go = new Button(){ Text = "Go" }; | |
var back = new Button(){ Text = "Clear" }; | |
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.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ |
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
protected override void OnModelCreating(DbModelBuilder modelBuilder) | |
{ | |
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>(); | |
} |
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
namespace System | |
{ | |
public static class DateTimeExtentions | |
{ | |
public static bool IsWeekend(this DateTime self) | |
{ | |
return (self.DayOfWeek == DayOfWeek.Sunday || self.DayOfWeek == DayOfWeek.Saturday); | |
} | |
public static bool IsLeapYear(this DateTime self) |
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.Collections.Generic; | |
namespace System | |
{ | |
public static class FuncExtentions | |
{ | |
public static Func<T, TResult> Memoize<T, TResult>(this Func<T, TResult> func) | |
{ | |
var cache = new Dictionary<T, TResult>(); | |
Func<T, TResult> memoizeFunc = n => |
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.Collections.Generic; | |
using System.Linq; | |
namespace System | |
{ | |
public static class IEnumerableExtensions | |
{ | |
public static void ForEach<T>(this IEnumerable<T> source, Action<T> action) | |
{ | |
Throw.IfIsNull(action); |
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.Linq; | |
using System.Text; | |
namespace System | |
{ | |
public static class StringExtentions | |
{ | |
public static string RemoveNonNumeric(this string self) | |
{ | |
Throw.IfIsNullOrEmpty(self); |
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
namespace System | |
{ | |
public static class IntExtentions | |
{ | |
#region [ Times ] | |
public static void Times(this int self, Action action) | |
{ | |
Throw.IfIsNull(action); | |
Throw.IfLessThanOrEqZero(self); |
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.Configuration; | |
using System.Linq; | |
namespace Configuration | |
{ | |
public static class AppSetting | |
{ | |
public static bool GetBoolean(string key, bool defaultValue = false) | |
{ |
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.Security.Cryptography; | |
namespace Cryptography | |
{ | |
public class RSA | |
{ | |
public static string Encrypt(string text, string key) | |
{ | |
Throw.IfIsNullOrEmpty(text); |