How to change System.DirectoryEntry “uSNChanged” attribute value to an Int64
I'm trying to get the Int64 value of a Directory Services object's "uSNChanged" value. Unfortunately, it is always coming back as a COM object of some kind. I've tried using casting to Int64, calling Int64.Parse(), and calling Convert.ToInt64(). None of these work. For a given DirectoryEntry object, this code will display the properties: private static void DisplaySelectedProperties(DirectoryEntry objADObject) { try { string[] properties = new string[] { "displayName", "whenCreated", "whenChanged", "uSNCreated", "uSNChanged", }; Console.WriteLine(String.Format("Displaying selected properties