Aspose.Words.Examples.CSharp.Programming_Documents.Working_With_Document.DocProperties.EnumerateProperties C# (CSharp) Method

EnumerateProperties() public static method

public static EnumerateProperties ( string dataDir ) : void
dataDir string
return void
        public static void EnumerateProperties(string dataDir)
        {
            // ExStart:EnumerateProperties            
            string fileName = dataDir + "Properties.doc";
            Document doc = new Document(fileName);
            Console.WriteLine("1. Document name: {0}", fileName);

            Console.WriteLine("2. Built-in Properties");
            foreach (DocumentProperty prop in doc.BuiltInDocumentProperties)
                Console.WriteLine("{0} : {1}", prop.Name, prop.Value);

            Console.WriteLine("3. Custom Properties");
            foreach (DocumentProperty prop in doc.CustomDocumentProperties)
                Console.WriteLine("{0} : {1}", prop.Name, prop.Value);
            // ExEnd:EnumerateProperties
        }
        public static void CustomAdd(string dataDir)