Click to Rate and Give Feedback
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.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)
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.

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

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"));

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, 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.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker