Set focus to textbox in Microsoft Silverlight

If you want to set the focus on a textbox in Microsoft Silverlight, use the Loaded event and the System.Windows.Browser.HtmlPage.Plugin.Focus() prior to calling Control.Focus() using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace Ada.Tts.Toggle.Silverlight { public …

How to get all items from a list that are not unique with LINQ and C#

If you want to get all items from a list that are not unique with LINQ and C#, you can use: using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using NUnit.Framework.SyntaxHelpers; namespace Ada.Cdf.Test { [TestFixture] public class IntegrationTester { [Test] [Explicit("Not a unittest")] public void Test() { List<string> …

How to count items per category with LINQ and C#

If you want to count items per category with LINQ in C#, you van use: using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using NUnit.Framework.SyntaxHelpers; namespace Ada.Cdf.Test { [TestFixture] public class IntegrationTester { [Test] [Explicit("Not a unittest")] public void Test() { List<string> items = new List<string>(); items.Add("Item 1"); …

Get index of an item with LINQ and C#

If you want to use the index of an item with LINQ in C#, you can use the “index” statement: using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using NUnit.Framework.SyntaxHelpers; namespace Ada.Cdf.Test { [TestFixture] public class IntegrationTester { [Test] [Explicit("Not a unittest")] public void Test() { List<string> items …

How to PowerPivot outlook data (*.ost or *.pst) data in Microsoft Office Excel 2010

First I extracted some data from the outlook inbox with C# to a CSV file: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Office.Interop.Outlook; using System.IO; namespace Common { public class Generator { const string Splitter = ","; const string CsvFIleName = "MailData.csv"; const string CsvPath = @"C:\BDATA"; public …