public void MyFunc(string methodName, params object[] list)
{
MethodInfo mi = this.GetType().GetMethod(methodName);
mi.Invoke(this, list);
}
@model Tuple<MvcApplication.Models.Post, MvcApplication.Models.Category>
private void TextBox_MouseWheel(object sender, MouseWheelEventArgs e)
{
MyFunc();
}
private void Window_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if (tb.IsFocused)
{
MyFunc();
}
}
XDocument doc = XDocument.Parse(xmlString);
IEnumerable<XElement> elements = doc.Descendants("item");
foreach (var item in elements)
{
Console.WriteLine(item.Element("key").Value + " " + item.Element("value").Value);
}
double d = double.Parse("1.1", CultureInfo.InvariantCulture);
double d = double.Parse("1,1", CultureInfo.GetCultureInfo("Ru-ru"));