Format:
Recent snippets for: afsharm
//without using Object Initializer Syntax letter = new Letter(); letter.Date = DateTime.Now.Date; letter.RegisterDate = DateTime.Now.Date; letter.LetterType = LetterType.Outgoing; letter.LetterInformation = new LetterInformation(); letter.LetterInformation.RuntimeState = common.RuntimeState.Added; letter.LetterInformation.Letter = letter;
295 Views
1 comments
public List<PersonInOrganization> ExtractInvalidEmails() { EntityCollection<PersonInOrganization> list = GetAllItems(); //my first LINQ use! var invalids = from l in list where !string.IsNullOrEmpty(l.Email) && !IsValidEmail(l.Email) select l; return invalids.ToList<PersonInOrganization>(); }
306 Views
1 comments
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
</system.web>
388 Views
no comments
string res = string.Empty; try { IQuery query = session.CreateQuery("select ao.CostCenterAccount from " + "AssetObservation as ao where ao.Asset.ID=:KEY " + "and ao.Date<:DATETIME order by Date asc"); query.SetInt64("KEY", asset.Id); query.SetDateTime("DATETIME", dateTime);
627 Views
1 comments
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { public class T3 { public delegate void del1();
269 Views
no comments
--خط زیر را اول تعریف متود مورد نظر قرار دهید
--با تشکر از مسعود
[PrincipalPermission(SecurityAction.Demand, Role = "SomeRole")]
318 Views
no comments
function ltr_override(e) { //از این تابع در onkeypress هر textBox که استفاده شود باعث میشود که //کاراکترهای تایپ شده توسط کاربر به طور مطلق از چپ به راست نمایش داده //شود. حتی اگر کاربر یک متن فارسی را وارد کند. کاربرد فعلی این تابع //در شماره نامه است که همیشه از چپ به راست خوانده میشود //دقت شود که رشته تولید شده توسط این تابع پر از کاراکتر یونیکد 0x202d است و //قبل از ذخیره در بانک اطلاعاتی یا انجام هر پردازش دیگری باید از رشته مورد نظر پاک شود
246 Views
no comments
System.Threading.Thread.CurrentThread.CurrentCulture = new FarsiLibrary.Utils.PersianCultureInfo(); System.Threading.Thread.CurrentThread.CurrentUICulture = new FarsiLibrary.Utils.PersianCultureInfo(); fXDatePicker1.FlowDirection = FlowDirection.RightToLeft;
575 Views
1 comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
