หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
MulticastOption.Group no longer accepts a value of null. If you set the property to null, an ArgumentNullException is thrown.
Version introduced
5.0
Change description
In previous versions of .NET, you can set the MulticastOption.Group property to null. If the MulticastOption is later passed to Socket.SetSocketOption, the runtime throws a NullReferenceException.
In .NET 5 and later, an ArgumentNullException is thrown if you set the property to null.
Reason for change
To be consistent with the Framework Design Guidelines, the property has been updated to throw an ArgumentNullException if the value is null.
Recommended action
Make sure that you don't set MulticastOption.Group to null.