Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 OnDeserializeUnrecognizedAttribute ...
Collapse All/Expand All Collapse All
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
ConfigurationElement..::.OnDeserializeUnrecognizedAttribute Method

Gets a value indicating whether an unknown attribute is encountered during deserialization.

Namespace:  System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)
Visual Basic (Declaration)
Protected Overridable Function OnDeserializeUnrecognizedAttribute ( _
    name As String, _
    value As String _
) As Boolean
Visual Basic (Usage)
Dim name As String
Dim value As String
Dim returnValue As Boolean

returnValue = Me.OnDeserializeUnrecognizedAttribute(name, _
    value)
C#
protected virtual bool OnDeserializeUnrecognizedAttribute(
    string name,
    string value
)
Visual C++
protected:
virtual bool OnDeserializeUnrecognizedAttribute(
    String^ name, 
    String^ value
)
JScript
protected function OnDeserializeUnrecognizedAttribute(
    name : String, 
    value : String
) : boolean

Parameters

name
Type: System..::.String
The name of the unrecognized attribute.
value
Type: System..::.String
The value of the unrecognized attribute.

Return Value

Type: System..::.Boolean
true when an unknown attribute is encountered while deserializing; otherwise, false.

The OnDeserializeUnrecognizedAttribute is invoked when an unknown attribute is encountered while deserializing the ConfigurationElement object.

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.

.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
Return Value      PaulWh ... lordabdul   |   Edit   |   Show History

The current description of the return value is misleading.

If you are overriding this method in custom ConfigurationElement class you should return false if the attribute is indeed unexpected, and return true if you have handled this attribute. If you return false, the configuration subsystem will throw an unhandled ConfigurationErrorsException.

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker