惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
Cloudbric
Cloudbric
The Register - Security
The Register - Security
小众软件
小众软件
PCI Perspectives
PCI Perspectives
G
Google Developers Blog
AI
AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
TaoSecurity Blog
TaoSecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
F
Full Disclosure
N
Netflix TechBlog - Medium
博客园_首页
Last Week in AI
Last Week in AI
A
Arctic Wolf
B
Blog RSS Feed
J
Java Code Geeks
C
Cybersecurity and Infrastructure Security Agency CISA
I
InfoQ
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Jina AI
Jina AI
有赞技术团队
有赞技术团队
S
Schneier on Security
L
Lohrmann on Cybersecurity
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Security Latest
Security Latest
Vercel News
Vercel News
博客园 - 司徒正美
Webroot Blog
Webroot Blog
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans

博客园 - 溺水妖精

连载暂时停止,因为要打官司^^在这里谢谢各位的支持啦! 徒给别人做嫁衣——与人共同创业(1) 好久没来了^^来看看,顺便整理一下我这几年的经历 那年的那一场雪 写给未来的孩子-----孩子不要怨恨,不要气馁,每个人都有自己的无奈,每个人都有受伤的时候,学会宽容,学会忍耐,学会善待自己和他人..... 好久没来写什么东西了:(鄙视下自己~~ 打开一个应用程序~~ - 溺水妖精 - 博客园 学习笔记1 刚才在博客堂看到的:( 今天从HELLO,WORLD开始! 55555555~~今天夸下海口,不学C#都不行了~~ 最近好倒霉哦!!!!!!!555555555555555555555555 下午没有什么事情,就做了个数值统计直方图,好玩,哈 今天是妇女节,一定要去采购,女人用的东西都打折:) 蓝冰 MYSQL和MSSQL修改密码总结----在此感谢一直帮助我的J9988大叔 一个男人的话 随想----真的是断翼天使~~ 周末了,好幸福哦!!!HOHO~~~~~~~~~~~~~~~~~~~~~
5555~~~晕了晕了~~~object类型的相等问题~~~ - 溺水妖精 - 博客园
溺水妖精 · 2004-03-22 · via 博客园 - 溺水妖精

哪个大哥能给讲讲object类型~~
还有什么情况下相等


这个是MSDN上的例子:

The example

 
using System;
class Test
{
   static void Main() {
      string s = "Test";
      string t = string.Copy(s);
      Console.WriteLine(s == t);
      Console.WriteLine((object)s == (object)t);
   }
}
produces the output
True
False

(object)s == (object)t,这个为什么不相等呢?

using System;
class Test
{
 static void Main()
 {
  object s = "Test";
  object t = "Test";
  Console.WriteLine(s == t);
  }
}这个为什么相等呢?

using System;
class Test
{
 static void Main()
 {
  object s = "Test";
  object t = "Tst";
  Console.WriteLine(s == t);
  }
}

这个怎么又不等呢??
=====================================

初学C#见谅