Saturday 22 December 2012

Copy forms between visual studio solutions

  1. Copy the three files, .cs, .designer, resx to the target solution folder.
  2. In the target project, select Add existing item and add the designer file first.
  3. Modify the Namespace attribute. The .cs file should come in as well.
  4. Modify the namespace in the .cs file.
  5. Add the resx file using Add existing item.

Sunday 13 March 2011

Predicates in C#

myList = List<...>;

SomeObject desiredObject = myObjects.Find( o => o.Id == desiredId);