Aspose.Words.Examples.CSharp.Programming_Documents.Working_With_Document.ProtectDocument.GetProtectionType C# (CSharp) Method

GetProtectionType() private static method

Shows how to get protection type
private static GetProtectionType ( string inputFileName ) : void
inputFileName string input file name with complete path.
return void
        private static void GetProtectionType(string inputFileName)
        {
            // ExStart:GetProtectionType
            Document doc = new Document(inputFileName);
            ProtectionType protectionType = doc.ProtectionType;
            // ExEnd:GetProtectionType
            Console.WriteLine("\nDocument protection type is " + protectionType.ToString());
        }
    }