最佳答案
您的语法不正确。要检查某物是否为指定类型:
s is PaymentSchedule
s is PaymentSchedule()
Console.WriteLine("PaymentSchedule: " + (s is PaymentSchedule).ToString() + "Code: " + s.GetHashCode());
Console.WriteLine("PaymentSchedule: {0} Code: {1}", s is PaymentSchedule, s.GetHashCode());
https://stackoverflow.com/questions/29844199/
相关文章:
c# - 获取我所在事件的控件实例
c# - 为什么在 C# 中看不到 Ping 类?
c# - 启动画面导致 Windows XP 崩溃
path - Makefile中的路径定义
c# - 使用 WhenAll 和 ContinueWith 时任务结果的顺序是什么
javascript - 在 Dart 中编译 Polymer 应用
macos - 在 Mac 上从 Fortran 编译 'static' 二进制文件
delphi - Delphi中一个和多个 "type" block 的区别
c++ - 在链表末尾插入节点时出错
node.js - Flatmap-stream 存在恶意提交,因此被删除。现在我无法运行我的网站,因为它是一个依赖项。关于我应该做什么有什么建议吗?