Format:
Recent snippets matching tags of C#
using System; using System.Collections.Generic; using System.Linq; using System.Dynamic; using System.Reflection; namespace Westwind.Utilities { /// <summary> /// Class that provides extensible properties and methods. This
210 Views
1 comments
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Request.IsAuthenticated) { ResetFormsAuthenticationTicket(); } else { Response.Redirect("~/logout.aspx"); }
15 Views
no comments
using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Web; namespace System.Text { public static class StringTransformer { static readonly string linkFormat = "<a href=\"{0}\" title=\"{0}\" target=\"{2}\" class=\"{3}\">{1}</a>"; /// <summary>
25 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Web; /// <summary> /// Summary description for OrderByHelper /// </summary>
20 Views
no comments
// FlowDesign C#, classic EBC // 4.1.2012, Christof Konstantinopoulos // Diagram : https://cacoo.com/diagrams/Vy5LOUn5NfhTARzj // File : Program.cs namespace FlowDesign_KlassischesEBC { class Program {
37 Views
1 comments
using System; using System.Text; namespace MwSt_cSharp { class Program { static Platine MainBoard = null; static void Main(string[] args)
27 Views
no comments
namespace Westwind.Utilities.Data { /// <summary> /// This class provides an easy way to turn a DataRow /// into a Dynamic object that supports direct property /// access to the DataRow fields. /// /// The class also automatically fixes up DbNull values /// (null into .NET and DbNUll to DataRow) /// </summary>
188 Views
no comments
namespace DataFieldMappingConsoleSample { using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; class Program {
27 Views
no comments
namespace DataFieldMappingConsoleSample { using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.Linq; using System.Reflection; [AttributeUsage(AttributeTargets.Property)]
20 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; namespace Westwind.Web.Services { /// <summary> /// Implements the Gravatar API for retrieving a Gravatar image to display
216 Views
2 comments
Rectangle m_Rectangle;
TranslateTransform m_Transform;
Microsoft.Devices.Sensors.Accelerometer m_Accelerometer;
public MainPage()
{
InitializeComponent();
Loaded += MainPage_Loaded;
Unloaded += (s, e) => { m_Accelerometer.Stop(); };
}
114 Views
no comments
static void Main(string[] args) { Console.WriteLine(PhoneNumber("12345678901234")); Console.WriteLine(PhoneNumber("1234567890123")); Console.WriteLine(PhoneNumber("123456789012")); Console.WriteLine(PhoneNumber("12345678901")); Console.WriteLine(PhoneNumber("1234567890")); Console.WriteLine(PhoneNumber("123456789")); Console.WriteLine(PhoneNumber("12345678")); Console.WriteLine(PhoneNumber("1234567"));
70 Views
no comments
public abstract class ViewModelBase : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected void RaisePropertyChanged(string property) { if (PropertyChanged == null) return; PropertyChanged(this, new PropertyChangedEventArgs(property)); PropertyChanged(this,
97 Views
no comments
public static IEnumerable<Orders> ExcludeOrderTypes(this IEnumerable<Orders> orders, int[] orderTypeIdsToExclude) { if ((orders == null || orders.Count == 0)) { return new List<Orders>(); } if ((orderTypeIdsToExclude == null)) { return orders; }
32 Views
no comments
// Format names as one comma delimited string var names = string.Join(", ", (from p in people select d.Name).ToArray());
47 Views
no comments
public MainPage() { InitializeComponent(); var _List = new List<InputScopeNameValue>(); for (int i = 0; i < 100; i++) _List.Add((InputScopeNameValue)i); listBox1.ItemsSource = _List; }
55 Views
1 comments
using System; namespace ConsoleApplication1 { public delegate int Procesar( int x , int y); public class Calculo { public int Sumar ( int x, int y ) {
46 Views
no comments
/// <summary> /// Creates a Connection string from Conf.xml /// </summary> /// <param name="isEntityConnection"> /// The is Entity Connection. /// </param> /// <param name="serverName"> /// The server Name. /// </param> /// <param name="databaseName">
48 Views
no comments
public static class UnityContainerExtensions { public static void AssertMappingsAreValid(this IUnityContainer container) { foreach (var registration in container.Registrations) { container.Resolve(registration.RegisteredType, registration.Name); } } }
90 Views
no comments
public static UserPrincipal GetUserAdInfo(string domainName, string loginName) { PrincipalContext ctx = new PrincipalContext(ContextType.Domain, domainName); UserPrincipal user = UserPrincipal.FindByIdentity(ctx, loginName); if(user != null) { return user; }
68 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
