英語で読む 編集

次の方法で共有


ActivityLink.Equals Method

Definition

Overloads

Equals(ActivityLink)

Indicates whether the current activity link is equal to another activity link.

Equals(Object)

Indicates whether the current activity link is equal to another object.

Source:
ActivityLink.cs
Source:
ActivityLink.cs
Source:
ActivityLink.cs
Source:
ActivityLink.cs
Source:
ActivityLink.cs

Indicates whether the current activity link is equal to another activity link.

public bool Equals (System.Diagnostics.ActivityLink value);

Parameters

value
ActivityLink

The activity link to compare.

Returns

true if the current activity link is equal to value; otherwise, false.

Implements

Remarks

ActivityLink equality is currently undefined. The current behavior is that two ActivityLink instances with the same ActivityContext and no tags will return true for Equals(ActivityLink). Prior to .NET 7, ActivityLink instances sharing an ActivityTagsCollection instance and the same ActivityContext would return true for Equals(ActivityLink). Starting from .NET 7, Equals(ActivityLink) will always return false when tags are used. This may change in the future. Exercise caution in calling this method.

Applies to

.NET 9 およびその他のバージョン
製品 バージョン
.NET 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)
Source:
ActivityLink.cs
Source:
ActivityLink.cs
Source:
ActivityLink.cs
Source:
ActivityLink.cs
Source:
ActivityLink.cs

Indicates whether the current activity link is equal to another object.

public override bool Equals (object? obj);

Parameters

obj
Object

The object to compare.

Returns

true if the current activity link is equal to obj; otherwise, false.

Remarks

ActivityLink equality is currently undefined. The current behavior is that two ActivityLink instances with the same ActivityContext and no tags will return true for Equals(Object). Prior to .NET 7, ActivityLink instances sharing an ActivityTagsCollection instance and the same ActivityContext would return true for Equals(Object). Starting in .NET 7, Equals(Object) always returns false when tags are used.

Applies to

.NET 9 およびその他のバージョン
製品 バージョン
.NET 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)