How to convert Booleans and objects to string in String Function Using XPath in Xml

In this article I will explain the conversion from Boolean and objects in string.
  • 2110

Introduction

In my previous article  I will explain the string function and the conversion from node-sets to string and also the conversion from numbers to strings Now In this article I will explain the conversion from Boolean to string and object to string.

Syntax

string string (object?)

Converting Boolean to string : The string() function converts a Boolean to a string by the following way:

  • The false value of  Boolean is converted to the string "false".
  • The true value of  Boolean  is converted to the string "true".

Converting Objects to string : The string() function converts a objects to a string by the following way:

An object of a type other than the four basic types is converted to a string in a way that is dependent on that type.If the argument is omitted, it defaults to a node-set with the context node as its only member.

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.