CheckPassword
IPresentationInfo.CheckPassword 方法
检查给定的密码是否正确,用于保护开放密码的演示文稿。
public bool CheckPassword(string password)
参数 | 类型 | 描述 |
---|---|---|
password | String | 要检查的密码。 |
返回值
如果演示文稿受到开放密码保护且密码正确,则返回 true;否则返回 false。
注释
当密码为 null 或为空时,此方法返回 false。
示例
[C#]
IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo("pres.pptx");
bool isPasswordCorrect = info.CheckPassword("my_password");
另见
- 接口 IPresentationInfo
- 命名空间 Aspose.Slides
- 程序集 Aspose.Slides