How to convert numbers to string in String Function Using XPath in Xml

In this article I will explain the conversion from numbers to string.
  • 2250

Introduction

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

Syntax

string string (object?)

Converting numbers to string : The string() function converts a number to a string by the following ways:

  • NaN (Not a Number) is converted to the string NaN.
  • positive zero is converted to the string "0".
  • negative zero is converted to the string "0".
  • positive infinity is converted to the string "Infinity".
  • negative infinity is converted to the string "-Infinity".
  • If the number is an integer, the number is represented in decimal form as a number with no decimal point and no leading zeros, and if the number is a negative number than a (-) sign is used before the number.
  • Otherwise, the number is represented in decimal form as a number with a decimal point and at least one digit before the decimal point and at least one digit after the decimal point, and if the number is a negative number than a (-) sign is used before the number.

Ask Your Question 

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

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.