Created
December 3, 2015 20:08
-
-
Save samueleresca/57e26875745babe5f213 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestClass] | |
public class ConditionalSerializingTests | |
{ | |
public Telefilm[] Telefilms = new Telefilm[]{ | |
new Telefilm{TelefilmId=1 , TelefilmName="Slevin" , CreateDate= new DateTime(1999,04,23)}, | |
new Telefilm{TelefilmId=2 , TelefilmName="Scrubs" , CreateDate= new DateTime(2001,02,08) }, | |
new Telefilm{TelefilmId=3 , TelefilmName="HIMYM" , CreateDate= new DateTime(2004,12,05)}, | |
new Telefilm{TelefilmId=4 , TelefilmName="Californication", CreateDate= new DateTime(2010,02,12)} | |
}; | |
[TestMethod] | |
public void SerializeTelefilms() | |
{ | |
string serializedObj = JsonConvert.SerializeObject(this.Telefilms, Formatting.Indented); | |
serializedObj.ToString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment