Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

clone

Add column clone to data table in c#
Tuesday, 31 January 2012 09:36
Add following line to your code to clone a column


dt.Columns.Add("StudentID", System.Type.GetType("System.String"),"GNRNumber");

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/WAV35DpR5rI/14583

 
C# code to test if an object is serializable
Tuesday, 02 August 2011 15:20
The code below contains utility methods and an example test method to check if a class is truly serializable by cloning it using serialization then comparing the original to the clone.


public static Stream Serialize(object source)
{
IFormatter formatter = new BinaryFormatter();
Stream stream = new MemoryStream();
formatter.Serialize(stream, source);
return stream;
}

public static T Deserialize(Stream stream)
{
IFormatter formatter = new BinaryFormatter();
stream.Position = 0;
return (T)formatter.Deserialize(stream);
}

public static T CloneBySerialization(T source)
{
return Deserialize(Serialize(source));
}

public static void AssertRoundTripSerializationIsPossible(T source)
{ // assumes T implements Equals
T clone = CloneBySerialization(source);
Assert.AreEqual(source, clone, "Failed round-trip serialization, clone not equal to source");
Assert.IsFalse(ReferenceEquals(source, clone), "Failed round-trip serialization, clone points to souce");
}

[TestMethod]
public void ClassShouldBeSeralizable()
{
Foo original = new Foo("bar");
AssertRoundTripSerializationIsPossible(original);
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/QBlm0HoTlhc/13455

 
China Is Copying the Web Too [Internet]
Monday, 28 February 2011 10:40
China is not only copying consoles, iPhones and Rolexes. They are also in the business of copying web sites. Why come up with an original idea when you just can watch the west and clone the successful ideas for 1.3 billion people? This is their Foursquare clone. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/MoEVMizw9uA/

 
This Week's Top Web Comedy Video: Sexy Clone Dilemma [Video]
Friday, 11 February 2011 22:00
Click to viewOkay, so I know you're supposed to shoot the evil clone every time. But what if the evil clone is also the only one that'll give you the time of day? That, my friends, makes for a much harder choice. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/DWLuebIN_FY/

 
How to Install Node.js on a Mac
Tuesday, 10 August 2010 19:39
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/4u3hr2aqiXg/12021

 


Taxonomy by Zaragoza Online