246 {
247 if (name == null)
248 {
249 throw new ArgumentNullException("name");
250 }
251 int pcbResult;
252 global::Interop.NCrypt.ErrorCode errorCode = global::Interop.NCrypt.NCryptGetProperty(
_keyHandle, name,
null, 0, out pcbResult,
options);
253 return errorCode switch
254 {
255 global::Interop.NCrypt.ErrorCode.NTE_NOT_FOUND => false,
256 global::Interop.NCrypt.ErrorCode.ERROR_SUCCESS => true,
257 _ => throw errorCode.ToCryptographicException(),
258 };
259 }
readonly SafeNCryptKeyHandle _keyHandle