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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 溺水妖精

连载暂时停止,因为要打官司^^在这里谢谢各位的支持啦! 徒给别人做嫁衣——与人共同创业(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#见谅