Format:
Recent snippets matching language of C#
using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls;
3 Views
no comments
using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls;
5 Views
no comments
public class FullScreenCommand : ICommand { public event EventHandler CanExecuteChanged; public bool CanExecute(object parameter) { bool isFullScreen = (bool.TryParse(parameter.ToString(), out isFullScreen)) ? isFullScreen : true; return Application.Current.Host.Content.IsFullScreen != isFullScreen; }
33 Views
no comments
private void listView1_SelectedIndexChanged(object sender, EventArgs e) { if (this.listView1.SelectedItems.Count == 0) { this.pictureBoxRight.Image = null; } else { MyRow tag = (MyRow) this.listView1.SelectedItems[0].Tag; utils.load(Image.FromStream(new MemoryStream(tag.photo)), this.pictureBoxRight);
6 Views
no comments
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; using System.IO;
7 Views
no comments
FormSearch search = new FormSearch(); search.Owner = this; if (search.ShowDialog() == DialogResult.OK) { this.sqlSelectCommand1.Parameters.Clear(); this.dataSetPhotosoc1Instance.Clear(); if (search.radioButton1.Checked) {
6 Views
no comments
public interface IDummyFactory { IDummyService CreateDummyService(); TService CreateService<TService>(); IHandler<TMessage> CreateHandler<TMessage>(); object CreateService(Type pluginType); }
91 Views
no comments
[DataContract] public class UserBooleanDecision { [DataMember] public bool? Decision { get; set; } [DataMember] public bool RequiresAnswer { get; set; } }
31 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.Linq; namespace HelpDesk.Models { public interface IGenericRepository { IQueryable<T> Get<T>() where T : class; void Insert<T>(T item) where T : class;
5 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; namespace DynamicObjectContracts { public class Program
176 Views
no comments
public class ErrorModel : IEnumerable<string> { public IEnumerator<string> GetEnumerator() { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator();
6 Views
no comments
while(true) { events.Publish(new ConsoleKeyPressedEvent { Info = Console.ReadKey(); } }
6 Views
no comments
class GeomAssign { Texture2D _sprite; List<Geom> _geoms; public GeomAssign(Texture2D Sprite, ref List<Geom> Geoms) { _geoms = Geoms; _sprite = Sprite; }
10 Views
no comments
new Country { Name = "Anguilla", Region = "The Americas" }, new Country { Name = "Antigua and Barbuda", Region = "The Americas" }, new Country { Name = "Argentina", Region = "The Americas" }, new Country { Name = "Aruba", Region = "The Americas" }, new Country { Name = "Bahamas", Region = "The Americas" }, new Country { Name = "Barbados", Region = "The Americas" }, new Country { Name = "Belize", Region = "The Americas" }, new Country { Name = "Bermuda", Region = "The Americas" }, new Country { Name = "Bolivia", Region = "The Americas" }, new Country { Name = "Brazil", Region = "The Americas" },
10 Views
no comments
[TestMethod]
public void test56()
{
// Fixture setup
// Exercise system
// Verify outcome
7 Views
no comments
//Get the current title product int titleID = Convert.ToInt32(Request.QueryString["TitleID"]); Products title = db.Products.Where(t => t.ProductID == titleID).FirstOrDefault(); //Get a SearchItem.cs for this title BLL.Search oSearch = new BLL.Search(); BLL.SearchItem si = oSearch.BuildSearchItem(title); if (si.SeriesID == 0)
10 Views
no comments
//--------------------------------------------------------------------- // <autogenerated> // // Generated by Message Compiler (mc.exe) // // Copyright (c) Microsoft Corporation. All Rights Reserved. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </autogenerated>
10 Views
no comments
using System; using System.Runtime.Serialization; using System.Threading; using System.Diagnostics; namespace SMSServer.Exceptions { /// <summary> /// Custom exception class. /// </summary>
6 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using log4net; namespace SMSServer.Exceptions { public class SMSException : Exception
9 Views
no comments
List<BLL.SearchItem> relatedProducts = new List<BLL.SearchItem>(4); BLL.Search oSearch = new BLL.Search(); db.RelatatedProducts.Include("ProductsRelated").Where(rp => rp.ProductID == 8) .OrderBy(rp => rp.Rank) .Take(4) .ToList() .ForEach(rp => relatedProducts.Add(oSearch.BuildSearchItem(rp.ProductsRelated)));
9 Views
no comments
List<BLL.SearchItem> relatedProducts = new List<BLL.SearchItem>(4); BLL.Search oSearch = new BLL.Search(); db.RelatatedProducts.Include("Products").Where(rp => rp.ProductID == 8) .OrderBy(rp => rp.Rank) .Take(4) .ToList() .ForEach(rp => relatedProducts.Add(oSearch.BuildSearchItem(rp.Products)));
9 Views
no comments
List<BLL.SearchItem> relatedProducts = new List<BLL.SearchItem>(4); BLL.Search oSearch = new BLL.Search(); db.RelatatedProducts.Include("Products").Where(rp => rp.ProductID == 8) .Take(4) .ToList() .ForEach(rp => relatedProducts.Add(oSearch.BuildSearchItem(rp.Products)));
8 Views
no comments
using System.Collections.Generic; using System.Collections.ObjectModel; namespace Microsoft.Practices.Composite { public static class CollectionExtensions { public static Collection<T> AddRange<T>(this Collection<T> collection, IEnumerable<T> items); }
6 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
