กิจกรรม
17 มี.ค. 21 - 21 มี.ค. 10
แอปอัจฉริยะ เข้าร่วมชุด meetup เพื่อสร้างโซลูชัน AI ที่ปรับขนาดได้ตามกรณีการใช้งานจริงกับนักพัฒนาและผู้เชี่ยวชาญร่วมกัน
ลงทะเบียนตอนนี้เบราว์เซอร์นี้ไม่ได้รับการสนับสนุนอีกต่อไป
อัปเกรดเป็น Microsoft Edge เพื่อใช้ประโยชน์จากคุณลักษณะล่าสุด เช่น การอัปเดตความปลอดภัยและการสนับสนุนด้านเทคนิค
Possible unintended reference comparison; to get a value comparison, cast the right hand side to type 'type'
The compiler is doing a reference comparison. If you want to compare the value of strings, cast the right side of the expression to type
.
The following sample generates CS0253:
// CS0253.cs
// compile with: /W:2
using System;
class MyClass
{
public static void Main()
{
string s = "11";
object o = s + s;
bool c = s == o; // CS0253
// try the following line instead
// bool c = s == (string)o;
}
}
คำติชม .NET
.NET เป็นโครงการโอเพนซอร์ส เลือกลิงก์เพื่อให้คำติชม:
กิจกรรม
17 มี.ค. 21 - 21 มี.ค. 10
แอปอัจฉริยะ เข้าร่วมชุด meetup เพื่อสร้างโซลูชัน AI ที่ปรับขนาดได้ตามกรณีการใช้งานจริงกับนักพัฒนาและผู้เชี่ยวชาญร่วมกัน
ลงทะเบียนตอนนี้