[HowTo] Linq Pluralize
Sometimes Linq add or remove ‘s’ to the objecs, this is an option availlable in : Tools -> Options -> Database Tools -> O/R Designer
[HowTo] Display a separator on the status strip in a winform
Separator On Status Strip
[HowTo] disable “unknown publisher” security message on Windows Mobile device
http://xman892.blogspot.be/2007/07/visual-studio-2008-device-security.html
Visual Studio 2012 Color Theme
First thing first, here is the tool : http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05 Install via Extension Manager (Tools/Options) Install via Visual Studio Gallery.com (download and open directly or save then double-click) Install via “xcopy” into %appdata%\Local\Microsoft\VisualStudio\10.0\Extensions For Visual Studio 2012 Express, check this link : http://alinconstantin.blogspot.be/2012/09/using-color-themes-with-visual-studio.html How to change Icons : http://vsip.codeplex.com/
[HowTo] Raising Custom Events in C#
First you need to declare an event in the class that’s going to raise the event. This is just like declaring a normal variable: public event EventHandler MyEvent; Then you need a method that’s going to be called to raise the event. This goes into the same class that you just declared the event in. […]
[HowTo] Find the Component Container
[Browsable(true)] [Category(“Data”), Description(“The parent container, usually the form, that contains the controls on which the ErrorProvider can display error icons “), Localizable(true)] public ContainerControl ContainerControl { get { return _containerControl; } set { _containerControl = value; } } public override ISite Site { get { return base.Site; } set { base.Site = value; if (value […]
The type initialized for ‘SingletonCreator’ threw an exception or System.BadImageFormatException
You are using GreatMap.Net (Gmap.net) in visual studio and you eventually have one of those error messages : The type initialized for ‘SingletonCreator’ threw an exception System.BadImageFormatException Don’t worry there is a solution… The type initialized for ‘SingletonCreator’ threw an exception Simply add this useLegacyV2RuntimeActivationPolicy=”true” in your app.config file in the <Startup> tag in order […]
[.NET] Use IIS Express instead ASP.NET Development Server (Cassini)
Tutorial in French Download link
Linq to SQL Like Operator
Starting from a simple query from Northwind Database; var query = from c in ctx.Customers where c.City == “London” select c; The query that will be sent to the database will be: SELECT CustomerID, CompanyName, … FROM dbo.Customers WHERE City = [London] There are some ways to write a Linq query that results in using […]
Visual Studio DBML and SQL column default value
Usually when creating a database table, you will tend to add “default values” to some columns (Guid, Dates, …). BEGIN ALTER TABLE [dbo].[User] ADD DEFAULT (getdate()) FOR [Created] END Adding the table to a DBML file under visual studio will ‘by default’ disallow the default value in the table. The mapping with default values will […]