<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.6.1" -->
<rss version="0.92">
<channel>
	<title>Random namespace</title>
	<link>http://nathetnico.fr/dev</link>
	<description>just bits of code</description>
	<lastBuildDate>Mon, 26 Apr 2010 19:26:26 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>deep copying objects in C#</title>
		<description>One of the fastest ways to deep copy an object is to serialize it to a binary stream and unserialize it to a new object, in that matter:

        /// 
        /// Creates a deep copy of ...</description>
		<link>http://nathetnico.fr/dev/archives/132</link>
			</item>
	<item>
		<title>Playing with winforms textbox border color.</title>
		<description>This is a small hack class that adds a set color for input area borders (textbox, richtextbox, combos, etc.) Here is the result:

[caption id="" align="aligncenter" width="400" caption="Screenshot"][/caption]

It all holds up in a single file:


    /// 
    /// This class adds border to input elements ...</description>
		<link>http://nathetnico.fr/dev/archives/115</link>
			</item>
	<item>
		<title>Winforms flicker-free forms.</title>
		<description>Ever had those flickers in your 50+ component forms?

Trying to play with SuspendLayout / ResumeLayout didn't help? That's because it only suspends the automatic layout,  triggered by the Anchor and Dock properties.

Setting double-buffering to true didn't help either? That's because it only suppresses flicker on individual controls: a label, ...</description>
		<link>http://nathetnico.fr/dev/archives/108</link>
			</item>
	<item>
		<title>Adding programs to path.</title>
		<description>
By default, some programs will be installed while automatically being setup in order to be run from the command line. 
For ex., [Win]+R 'devenv' launches Visual Studio.

I happened to run into this article which precises how to add some more:

Registry: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths

	Create a new sub-key with the name of the ...</description>
		<link>http://nathetnico.fr/dev/archives/103</link>
			</item>
	<item>
		<title>Java foreach.</title>
		<description>Java 5 got a bit closer to its twin C# by adding the possibility of directly accessing entities of a list or collection through its own "foreach" functionality :

C# :
foreach(type var in arr){
  // implement body
}

Java :
for (type var : arr) {
    // implement body
}
 </description>
		<link>http://nathetnico.fr/dev/archives/97</link>
			</item>
	<item>
		<title>List.Find() use of delegates</title>
		<description>Delegates make it easier to find stuff in generic lists.
Let's consider the following simple class:
Public Class Person{
  private string m_name;
  private int m_age;

  // .Net3.0 syntax only.
  public string Name{get;set}
  public int Age{get;set}

  public Person(string name, int age){
    m_name = name;
 ...</description>
		<link>http://nathetnico.fr/dev/archives/93</link>
			</item>
	<item>
		<title>Encrypted binary serialization</title>
		<description>For re-use: a small class that does encryption and binary serialization:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security.Cryptography;
using System.Windows.Forms;

namespace MyNamespace
{
    class Tools
    {
        // change me...
        private static string m_encryptionKey = ...</description>
		<link>http://nathetnico.fr/dev/archives/87</link>
			</item>
	<item>
		<title>Masters without style.</title>
		<description>Everytime I start digging into a new technology, I find myself quickly pointed towards some of the most talented computer science geek's home page. And when I say talented, I mean "genius"... Those are the founding fathers of CS; those are the Ones who shift right four times the price ...</description>
		<link>http://nathetnico.fr/dev/archives/76</link>
			</item>
	<item>
		<title>Les blocs conditionnels If, Case, etc&#8230;</title>
		<description>Il m'arrive souvent de voir des blocs de code de contrôle inutilement complexes, mais je suis tombé récemment sur un bloc qui m'a particulièrement bluffé :

if( iNb < 100 ) {
  if( iNb > 50 ) {
     [... bloc 1 ...]
  } else if( ...</description>
		<link>http://nathetnico.fr/dev/archives/70</link>
			</item>
	<item>
		<title>Bien implémenter son singleton</title>
		<description>Lorsque plusieurs membres d'un programme vont utiliser les mêmes données, on se retrouve confronté au choix entre le singleton et la classe statique. Ce choix est assez important, et dépend entièrement de la visibilité de ces données. Il sera parfois plus judicieux d'utiliser une classe statique qu'un singleton. Par exemple, ...</description>
		<link>http://nathetnico.fr/dev/archives/52</link>
			</item>
</channel>
</rss>

