enum GenderType
{
male,
femail,
others
}@Html.DropDownListFor(model => model.Gender, new SelectList(Enum.GetValues(typeof(GenderType))))
enum GenderType
{
male,
femail,
others
}@Html.DropDownListFor(model => model.Gender, new SelectList(Enum.GetValues(typeof(GenderType))))
@Html.LabelFor(m => m.Title, new { style = "display:inline" })
using Microsoft.Office; .... xlsApp = new Excel.ApplicationClass(); xlsWBs = xlsApp.Workbooks; xlsWB = xlsWBs.Open(TempFileName,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing);
using System.Configuration; Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); KeyValueConfigurationCollection appSettings = config.AppSettings.Settings; appSettings["WorkingMinutes"].Value = numericUpDownWorkingPeriod.Value.ToString(); appSettings["RestMinutes"].Value = numericUpDownRestPeriod.Value.ToString(); appSettings["PhotoPath"].Value = textBoxPhotoPath.Text.Trim(); config.Save(); ConfigurationManager.RefreshSection(config.AppSettings.SectionInformation.Name);
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); KeyValueConfigurationCollection appSettings = config.AppSettings.Settings; appSettings["key1"].Value = "value1"; appSettings["key2"].Value = "value2"; config.Save(); ConfigurationManager.RefreshSection(config.AppSettings.SectionInformation.Name);
string[] source = new string[5] { "12345", "1234", "45678", "6789", "6" };
// Method 1
var result1 = from o in source
where o.Length > 4 && o.StartsWith("1")
select o;
// Method 2
var result2 = from o in source
where (o.Length > 4 & o.StartsWith("1"))
select o;
// Method 3
var result3 = from o in source
where o.Length > 4
where o.StartsWith("1")
select o;
// Method 4
var result4 = source.Where(o => o.Length > 4).Where(o => o.StartsWith("1"));string[] source = new string[5] { "12345", "1234", "45678", "6789", "6" }; // Method 1 var result1 = from o in source where o.Length > 4 && o.StartsWith("1") select o; // Method 2 var result2 = from o in source where (o.Length > 4 & o.StartsWith("1")) select o; // Method 3 var result3 = from o in source where o.Length > 4 where o.StartsWith("1") select o; // Method 4 var result4 = source.Where(o => o.Length > 4).Where(o => o.StartsWith("1"));