C# Create Guid Get link Facebook Twitter Pinterest Email Other Apps madeinstein , January 22, 2009 This is a short form 32 characters GUID System.Guid.NewGuid().ToString("N") Comments
Parse XML to dynamic object in C# madeinstein , July 24, 2012 <? xml version="1.0" encoding="utf-8" ?> < contacts > < contact id = '1' > < firstName > Michael </ firstName > < lastName > Jordan </ lastName > < age > 40 </ age > < dob > 1965 </ dob > < salary > 100.35 </ salary > </ contact > < contact id = '2' > < firstName > Scottie </ firstName > < lastName > Pippen </ lastName > < age > 38 </ age > < dob > 1967 </ dob > < salary > 55.28 </ salary > </ contact > </ contacts > public class XmlToDynamic { public static void Parse(dynamic parent, XElement node) { if (node.HasElements) { if (node.Elements(node.Elements().First().Name.LocalName).Count() > 1) { //list var item = new ExpandoObject(); var list = new List<dynamic Read more
Multiple TeamCity Build Agents on one Server madeinstein , February 16, 2018 multiple-teamcity-build-agents-on-one-server Read more
Parse XML to object model in C# using XSD utility madeinstein , July 24, 2012 * Run xsd Visual Studio command line utility to generate object from xsd file (from Visual Studio Command Prompt) * Then add the cs file to your project (same place as your xsd file) < xsd : schema xmlns : xsd = "http://www.w3.org/2001/XMLSchema" targetNamespace = "urn:contacts" xmlns : bks = "urn:contacts" > < xsd : element name = "contacts" type = "bks:Contacts" /> < xsd : complexType name = "Contacts" > < xsd : sequence > < xsd : element name = "contact" type = "bks:Contact" minOccurs = "0" maxOccurs = "unbounded" /> </ xsd : sequence > </ xsd : complexType > < xsd : complexType name = "Contact" > < xsd : sequence > < xsd : element name = "firstName" type = "xsd:string" /> < xsd : element name Read more
Comments
Post a Comment