C# - is
Checks if an object is compatible with a given type.
An is expression evaluates to
true if the provided expression is non-null, and the provided object can be cast to the provided type without causing an exception to be thrown.
The is keyword causes a compile-time warning if the expression is known to always be
true or to always be false, but typically evaluates type compatibility at run time.
The is operator cannot be overloaded.
Note that the
is operator only considers reference conversions, boxing conversions, and unboxing conversions. Other conversions, such as user-defined conversions, are not considered.
Anonymous methods are not allowed on the left side of the
is operator. This exception includes lambda expressions.
随机推荐
- java的提取与替换操作
public class Demo02 { public static void main(String args[]){ String str = "java 技术学习班 2007032 ...
- JS经常使用正則表達式【分享】
工作中JS经常使用表达式: 1)2010-09-10类型日期校验 2)推断正整数.字符串长度 3)校验长度,和是否空 4)推断字符串是否为空 5)比較字符大小 6)推断字符串长度 7)推断格式是否为E ...
- C# WPF Datagrid的筛选
public static void SearchResult(DataGrid dg,string condition) { #region string code = string.Empty; ...
- Linux查看进程线程个数
1.根据进程号进行查询: # pstree -p 进程号 # top -Hp 进程号 2.根据进程名字进行查询: # pstree -p `ps -e | grep server | awk '{pr ...
- Nagios经check_http监视web申请书server多个tomcat维修
怎么样nagios显示器tomcat,它是一个相对简单的和复杂的事情.简单是因为,只有监控的假设web应用服务器tomcat无论是服务正常进行,很简单.假设你要监视tomcat其他例子,例如连接数jv ...
- JavaScript类数组对象参考
JavaScript和DOM中有很多类数组对象,它们有以下特点 1.有length属性 2.可以使用[]通过下标访问 3.部分类数组对象使用[]访问成员时不只可以使用下标,还可以使用id或name 4 ...
- 主席树(可持久化线段树) 静态第k大
可持久化数据结构介绍 可持久化数据结构是保存数据结构修改的每一个历史版本,新版本与旧版本相比,修改了某个区域,但是大多数的区域是没有改变的, 所以可以将新版本相对于旧版本未修改的区域指向旧版本的该区域 ...
- 上门洗车APP --- Androidclient开发 之 项目结构介绍
上门洗车APP --- Androidclient开发 之 项目结构介绍 前言 尽管公司项目较紧,但还是抽空给大家继续更新. o_O"~ 欢迎大家的关注,非常高兴和大家共同学习.前面给大家分 ...
- uIP中国的协议文件:Ch01
uIP0.9 参考 by Doxygen 1.3.3 Tue Oct 7 15:51:00 2003 译: fishOnFly(鱼在飞) uIP-refman中文pdf下载 第1章 uIP TCP/ ...
- Codeforces Round #256 (Div. 2) C. Painting Fence 或搜索DP
C. Painting Fence time limit per test 1 second memory limit per test 512 megabytes input standard in ...