Saturday

How to create abstract object with serialization methods.

C#,CSharp : it will be easy to serialize/deserialize inherited object into xml string
   23     abstract public class AbstractXMLObject
   24     {
   25         public string XML
   26         {
   27             get
   28             {
   29                 XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
   30                 StringWriter stringWriter = new StringWriter();
   31                 xmlSerializer.Serialize(stringWriter, this);
   32                 return stringWriter.ToString();
   33             }
   34             set
   35             {
   36                 XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
   37                 StringReader stringReader = new StringReader(value);
   38                 this = xmlSerializer.Deserialize(stringReader);
   39             }
   40         }
   41     }

No comments:

here is powershell script on how to get list of files from changesets associated with one tfs task

$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...