.NET Framework Class Library
EventMappingSettingsCollection..::.Contains Method

Indicates whether the collection contains an EventMappingSettings object with the specified name.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)
Syntax

Visual Basic (Declaration)
Public Function Contains ( _
    name As String _
) As Boolean
Visual Basic (Usage)
Dim instance As EventMappingSettingsCollection
Dim name As String
Dim returnValue As Boolean

returnValue = instance.Contains(name)
C#
public bool Contains(
    string name
)
Visual C++
public:
bool Contains(
    String^ name
)
JScript
public function Contains(
    name : String
) : boolean

Parameters

name
Type: System..::.String
The name of an EventMappingSettings object in the collection.

Return Value

Type: System..::.Boolean
true if the collection contains an EventMappingSettings object with the specified name; otherwise, false.
Remarks

This method returns false if the specified name does not exist.

Examples

The following code example shows how to use the Contains method. This code example is part of a larger example provided for the HealthMonitoringSection class.

Visual Basic
' See if the EventMappings collection property contains the event 'HeartBeats'.
Console.WriteLine("EventMappings contains 'HeartBeats': {0}.", _
    healthMonitoringSection.EventMappings.Contains("HeartBeats"))
C#
// See if the EventMappings collection property contains the event 'HeartBeats'.
Console.WriteLine("EventMappings contains 'HeartBeats': {0}.",
    healthMonitoringSection.EventMappings.Contains("HeartBeats"));
Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Tags :


Page view tracker