XmlReader.HasValue Property
This page is specific to:.NET Framework Version:1.12.03.03.5Silverlight 34.0
.NET Framework Class Library
XmlReader.HasValue Property

When overridden in a derived class, gets a value indicating whether the current node can have a Value.

[Visual Basic]
Public MustOverride ReadOnly Property HasValue As Boolean
[C#]
public abstract bool HasValue {get;}
[C++]
public: __property virtual bool get_HasValue() = 0;
[JScript]
public abstract function get HasValue() : Boolean;

Property Value

true if the node on which the reader is currently positioned can have a Value; otherwise, false.

Remarks

The following table lists node types that have a value to return.

Node Type Value
Attribute The value of the attribute.
CDATA The content of the CDATA section.
Comment The content of the comment.
DocumentType The internal subset.
ProcessingInstruction The entire content, excluding the target.
SignificantWhitespace The white space between markup in a mixed content model.
Text The content of the text node.
Whitespace The white space between markup.
XmlDeclaration The content of the declaration.

Example

See HasValue (in the XmlTextReader class) for a sample using this method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View