EntityFramework This is a .net ORM Mapper Framework from Microsoft to help you talking with your Database in an object […]
Category: .Net
Include a folder for deploy in Visual Studio
Suppose you have a build folder for all of your js files. That folder is not part of the solution […]
Visual Studio: Dark Side
<a href=”http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05” target=”_blank”>Visual Studio 2012 Color Theme Editor</a>. Select black one. <a href=”http://studiostyl.es/schemes/resharper-son-of-obsidian” target=”_blank”>Resharper – Son of obsidian</a>. Import settings. […]
ASP.NET Page Life Cycle Overview
http://msdn.microsoft.com/en-us/library/ms178472(v=vs.100).aspx ASP.NET Page Life Cycle Overview .NET Framework 4 Other Versions 205 out of 280 rated this helpful – Rate […]
Simple JSON Array Methods in C#
Echovoice.JSON ============== Echovoice JSON Array Encode, Decode and Pretty methods. Used internally until the public release of WS3V. This library […]
Regex-less JSONP callback validation via LINQ magic
For JSONP calls we should always restrict and validate the callback parameter to prevent code injections and other hacker attacks. […]
How to save editing value of DataGridView cell
The value is myDataGridView.Rows[i][j].EditedFormattedValue NOT myDataGridView.Rows[i][j].Value !! Reference : DataGridView某cell編輯中儲存
Integer raise-to-power-of
Don’t cast back and forth to double just to use Math.Pow(). Seriously. public static int Exp(this int x, int y) […]
Visual Studio’s vulnerability to Untrusted Projects
Have you ever download a project from the internet and opened it in Visual Studio? We’ve probably all seen the […]
Make Visual Studio Save Smarter
If you’re like me, 9 times out of 10 (or more), you actually want to Save All files and not […]
Using LINQ Aggregate effectively
I had some trouble figuring out how to use LINQ’s aggregate, one of the reasons is that I didn’t find […]
Replace an item in a List
Looks like there is no convenient way to do it. Unlike a Dictionary, List has no key to reference with. […]
Calendars Review: How To Select a Proper .NET Calendar?
This article describes the most popular ASP.NET calendars – DayPilot ASP.NET Event Calendar, DHTMLX Scheduler .NET, Devexpress ASP.NET Scheduler and […]
Generating Random Numbers and Strings in C#
//RANDOM STRING string random = System.IO.Path.GetRandomFileName().Replace(“.”, string.Empty); //RANDOM PASSWORD/STRING string randomPass = System.Web.Security.Membership.GeneratePassword(10, 0); //RANDOM INT System.Random randomInt = new […]
Remove MEF plugin at runtime
The only way to remove MEF plugins at runtime is possible by separating DirectoryCatalog in special AppDomain and using shadow […]
Split a string with different delimiters
String StringToSplit = “aa;bb,cc;dd”; char[] delimiters = new char[] { ‘;’, ‘,’ }; StringToSplit.Split(delimiters);
Simple action example
Here is a simple example of how use action //C# Event using Action delegate: public event Action OnSomeEvent; public event […]
Read text/xml file via C# over HTTP and get its content
//namespace using System.Net; string fileLocation = “http://site/file.txt”; ( could also be a xml file ) WebClient client = new WebClient(); […]
Building custom components for Xamarin Studio’s new iOS designer
I wrote a detailed, hands-on introduction to using the new iOS designer in Xamarin Studio. The blog post explains how […]
Access-Control-Allow-Origin Error
Problem: Trying to get jSON data from different domain/projects. **Error:** XMLHttpRequest cannot load (myurl). Origin (myurl2) is not allowed by […]