你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Check 类

定义

用于检查 Null/空并引发相应异常的实用工具

public static class Check
type Check = class
Public Class Check
继承
Check

方法

DirectoryExists(String)

检查 DirectoryPath 是否存在 如果 DirectoryPath 不存在,则引发 DirectoryNotFoundException

Empty<T>(IEnumerable<T>, Boolean, String)

用于检查 Null/空并引发相应异常的实用工具

FileExists(String)

检查 FilePath 是否存在 如果 filePath 不存在,则引发 FileNotFoundException

NotEmptyNotNull(String, String)

检查传入的字符串参数是否为 NonEmpty,如果枚举为 Null 或空,NotNull 将引发 NullReferenceException

NotNull(Object, String)

检查传入的参数是否为 NotNull Throws NullReferenceException(如果 arugment 为 Null)

适用于