1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
|
<Type Name="Int16" FullName="System.Int16" FullNameSP="System_Int16" Maintainer="ecma">
<TypeSignature Language="ILASM" Value=".class public sequential sealed serializable Int16 extends System.ValueType implements System.IComparable, System.IFormattable" />
<TypeSignature Language="C#" Value="public struct Int16 : IComparable, IComparable<short>, IConvertible, IEquatable<short>, IFormattable" />
<MemberOfLibrary>BCL</MemberOfLibrary>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadingSafetyStatement>This type is safe for multithreaded operations. </ThreadingSafetyStatement>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IComparable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IComparable<System.Int16></InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IConvertible</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IEquatable<System.Int16></InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IFormattable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>
<para>Represents a 16-bit signed integer.</para>
</summary>
<remarks>
<para>The <see cref="T:System.Int16" /> data type represents integer values ranging from
negative 32,768 to positive 32,767; that is, hexadecimal: 0x8000 to 0x7FFF.</para>
</remarks>
</Docs>
<Members>
<Member MemberName="CompareTo">
<MemberSignature Language="C#" Value="public int CompareTo (short value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Int16" />
</Parameters>
<Docs>
<param name="value">To be added.</param>
<summary>
<para>Returns the sort order of the current instance compared to the specified
<see cref="T:System.Int16" />.</para>
</summary>
<returns>
<para>The return value is a negative number, zero, or a positive number reflecting the sort order of the current instance as compared to <paramref name="value" />. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:</para>
<list type="table">
<listheader>
<term>Return Value</term>
<description>Description</description>
</listheader>
<item>
<term> A negative number</term>
<description>Current instance < <paramref name="value" />.</description>
</item>
<item>
<term> Zero</term>
<description>Current instance == <paramref name="value" />.</description>
</item>
<item>
<term> A positive number</term>
<description>Current instance > <paramref name="value" />.</description>
</item>
</list>
</returns>
<remarks>
<para>
<block subset="none" type="note">This method is implemented to support the <see cref="T:System.IComparable<Int16>" /> interface.</block>
</para>
</remarks>
<since version=".NET 2.0" />
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="CompareTo">
<MemberSignature Language="ILASM" Value=".method public final hidebysig virtual int32 CompareTo(object value)" />
<MemberSignature Language="C#" Value="public int CompareTo (object v);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="v" Type="System.Object" />
</Parameters>
<Docs>
<param name="v">The <see cref="T:System.Object" /> to compare to the current instance.</param>
<summary>
<para>Returns the sort order of the current instance compared to the specified
<see cref="T:System.Object" />.</para>
</summary>
<returns>
<para>The return value is a negative number, zero, or a positive number reflecting the sort order of the current instance as compared to <paramref name="value" />. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:</para>
<list type="table">
<listheader>
<term>Return Value</term>
<description>Description</description>
</listheader>
<item>
<term> A negative number</term>
<description>Current instance < <paramref name="value" />.</description>
</item>
<item>
<term> Zero</term>
<description>Current instance == <paramref name="value" />.</description>
</item>
<item>
<term> A positive number</term>
<description>Current instance > <paramref name="value" />, or
<paramref name="value" /> is a null reference.</description>
</item>
</list>
</returns>
<remarks>
<para>
<block subset="none" type="note">This method is
implemented to support the <see cref="T:System.IComparable" />
interface.</block>
</para>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is not a <see cref="T:System.Int16" /> and is not a null reference.</exception>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public bool Equals (short value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Int16" />
</Parameters>
<Docs>
<param name="value">To be added.</param>
<summary>
<para>Determines whether the current instance and the
specified <see cref="T:System.Int16" /> represent the same value.</para>
</summary>
<returns>
<para>
<see langword="true" /> if <paramref name="obj" /> represents the same value as the current instance; otherwise, <see langword="false" />.</para>
</returns>
<remarks>
<para>
<block subset="none" type="note">This method is implemented to support the <see cref="T:System.IEquatable<Int16>" /> interface.</block>
</para>
</remarks>
<since version=".NET 2.0" />
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual bool Equals(object obj)" />
<MemberSignature Language="C#" Value="public override bool Equals (object o);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="o" Type="System.Object" />
</Parameters>
<Docs>
<param name="o">The <see cref="T:System.Object" /> to compare to the current instance.</param>
<summary>
<para>Determines whether the current instance and the
specified <see cref="T:System.Object" /> represent the same type and
value.</para>
</summary>
<returns>
<para>
<see langword="true" /> if <paramref name="o" /> represents the
same type and value as the current instance. If <paramref name="o" /> is a null reference
or is not an instance of <see cref="T:System.Int16" />, returns <see langword="false" />.</para>
</returns>
<remarks>
<para>
<block subset="none" type="note">This method
overrides <see cref="M:System.Object.Equals(System.Object)" />.</block>
</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetHashCode()" />
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Generates a hash code for the current instance.</para>
</summary>
<returns>
<para>A <see cref="T:System.Int32" /> containing the hash code for the current instance.</para>
</returns>
<remarks>
<para>The algorithm used to
generate the hash code is unspecified. </para>
<para>
<block subset="none" type="note">This method
overrides <see cref="M:System.Object.GetHashCode" />.</block>
</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="GetTypeCode">
<MemberSignature Language="C#" Value="public TypeCode GetTypeCode ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.TypeCode</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="MaxValue">
<MemberSignature Language="ILASM" Value=".field public static literal int16 MaxValue = 32767" />
<MemberSignature Language="C#" Value="public const short MaxValue = 32767;" />
<MemberType>Field</MemberType>
<ReturnValue>
<ReturnType>System.Int16</ReturnType>
</ReturnValue>
<Parameters />
<MemberValue>32767</MemberValue>
<Docs>
<summary>
<para>Contains the maximum value for the <see cref="T:System.Int16" /> type.</para>
</summary>
<remarks>
<para> The value of this constant is 32,767 (hexadecimal 0X7FFF).</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="MinValue">
<MemberSignature Language="ILASM" Value=".field public static literal int16 MinValue = -32768" />
<MemberSignature Language="C#" Value="public const short MinValue = -32768;" />
<MemberType>Field</MemberType>
<ReturnValue>
<ReturnType>System.Int16</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Contains the minimum value for the <see cref="T:System.Int16" /> type.</para>
</summary>
<remarks>
<para>The value of this constant is -32,768 (hexadecimal 0X8000).</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
<MemberValue>-32768</MemberValue>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int16 Parse(string s)" />
<MemberSignature Language="C#" Value="public static short Parse (string s);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int16</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
</Parameters>
<Docs>
<param name="s">A <see cref="T:System.String" /> containing the value to convert. The string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style.</param>
<summary>
<para>Returns the specified <see cref="T:System.String" /> converted to a <see cref="T:System.Int16" /> value.</para>
</summary>
<returns>
<para>The <see cref="T:System.Int16" /> value obtained from <paramref name="s" />.</para>
</returns>
<remarks>
<para>This version of <see cref="M:System.Int16.Parse(System.String)" /> is equivalent to <see cref="M:System.Int16.Parse(System.String)" />
(<paramref name="s" />, <see cref="F:System.Globalization.NumberStyles.Integer" />, <see langword="null" /> ).</para>
<para>The string <paramref name="s" /> is parsed using the formatting
information in a <see cref="T:System.Globalization.NumberFormatInfo" /> initialized for the current system
culture. <block subset="none" type="note"> For
more information, see <see cref="P:System.Globalization.NumberFormatInfo.CurrentInfo" />.</block></para>
<paramref name="" />
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is a null reference.</exception>
<exception cref="T:System.FormatException">
<paramref name="s" /> is not in the correct style.</exception>
<exception cref="T:System.OverflowException">
<paramref name="s" /> represents a number greater than <see cref="F:System.Int16.MaxValue" /> or less than <see cref="F:System.Int16.MinValue" />.</exception>
<example>
<para>This example demonstrates parsing a string to a <see cref="T:System.Int16" />.</para>
<code lang="C#">using System;
public class Int16ParseClass {
public static void Main() {
string str = " 100 ";
Console.WriteLine("String: \"{0}\" <Int16> {1}",str,Int16.Parse(str));
}
}
</code>
<para>The output is</para>
<para>
<c>String: "
100 " <Int16> 100</c>
</para>
</example>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int16 Parse(string s, valuetype System.Globalization.NumberStyles style)" />
<MemberSignature Language="C#" Value="public static short Parse (string s, System.Globalization.NumberStyles style);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int16</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="style" Type="System.Globalization.NumberStyles" />
</Parameters>
<Docs>
<param name="s">A <see cref="T:System.String" /> containing the value to convert. The string is interpreted using the style specified by <paramref name="style" />. </param>
<param name="style">Zero or more <see cref="T:System.Globalization.NumberStyles" /> values that specify the style of <paramref name="s" />. Specify multiple values for <paramref name="style" /> using the bitwise OR operator. If <paramref name="style" /> is a null reference, the string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style. </param>
<param name="s">To be added.</param>
<param name="style">To be added.</param>
<summary>
<para>Returns the specified <see cref="T:System.String" /> converted to a <see cref="T:System.Int16" />
value.</para>
</summary>
<returns>
<para>The <see cref="T:System.Int16" /> value obtained from <paramref name="s" />.</para>
</returns>
<remarks>
<para>This version of <see cref="M:System.Int16.Parse(System.String)" /> is equivalent to <see cref="M:System.Int16.Parse(System.String)" />(<paramref name="s" />, <paramref name="style" />, <see langword="null" /> ).</para>
<para>The string <paramref name="s" /> is parsed using the formatting
information in a <see cref="T:System.Globalization.NumberFormatInfo" /> initialized for the current system culture. <block subset="none" type="note">For more information, see <see cref="P:System.Globalization.NumberFormatInfo.CurrentInfo" /> .</block></para>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is a null reference. </exception>
<exception cref="T:System.FormatException">
<paramref name="s" /> is not in the correct style.</exception>
<exception cref="T:System.OverflowException">
<paramref name="s" /> represents a number greater than <see cref="F:System.Int16.MaxValue" /> or less than <see cref="F:System.Int16.MinValue" />.</exception>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int16 Parse(string s, class System.IFormatProvider provider)" />
<MemberSignature Language="C#" Value="public static short Parse (string s, IFormatProvider fp);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int16</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="fp" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="s">A <see cref="T:System.String" /> containing the value to convert. The string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style.</param>
<param name="fp">A <see cref="T:System.IFormatProvider" /> that supplies a <see cref="T:System.Globalization.NumberFormatInfo" /> containing culture-specific formatting information about <paramref name="s" />.</param>
<param name="s">To be added.</param>
<summary>
<para>Returns the specified <see cref="T:System.String" /> converted to a <see cref="T:System.Int16" />value.</para>
</summary>
<returns>
<para>The <see cref="T:System.Int16" /> value obtained from <paramref name="s" />.</para>
</returns>
<remarks>
<para>This version of <see cref="M:System.Int16.Parse(System.String)" /> is equivalent to <see cref="M:System.Int16.Parse(System.String)" />(<paramref name="s" />, <see cref="F:System.Globalization.NumberStyles.Integer" />, <paramref name="provider" />).</para>
<para>The string <paramref name="s" /> is parsed using the
culture-specific formatting information from the <see cref="T:System.Globalization.NumberFormatInfo" />
instance supplied by <paramref name="fp" />. If <paramref name="fp" /> is
<see langword="null" /> or a
<see cref="T:System.Globalization.NumberFormatInfo" />
cannot be obtained from <paramref name="provider" />, the formatting information for the
current system culture is used.</para>
<paramref name="" />
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is a null reference.</exception>
<exception cref="T:System.FormatException">
<paramref name="s" /> is not in the correct style.</exception>
<exception cref="T:System.OverflowException">
<paramref name="s" /> represents a number greater than <see cref="F:System.Int16.MaxValue" /> or less than <see cref="F:System.Int16.MinValue" />.</exception>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int16 Parse(string s, valuetype System.Globalization.NumberStyles style, class System.IFormatProvider provider)" />
<MemberSignature Language="C#" Value="public static short Parse (string s, System.Globalization.NumberStyles style, IFormatProvider fp);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int16</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="style" Type="System.Globalization.NumberStyles" />
<Parameter Name="fp" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="s">A <see cref="T:System.String" /> containing the value to convert. The string is interpreted using the style specified by <paramref name="style" />.</param>
<param name="style">Zero or more <see cref="T:System.Globalization.NumberStyles" /> values that specify the style of <paramref name="s" />. Specify multiple values for <paramref name="style" /> using the bitwise OR operator. If <paramref name="style" /> is a null reference, the string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style.</param>
<param name="fp">A <see cref="T:System.IFormatProvider" /> that supplies a <see cref="T:System.Globalization.NumberFormatInfo" /> containing culture-specific formatting information about <paramref name="s" />.</param>
<param name="s">To be added.</param>
<param name="style">To be added.</param>
<summary>
<para>Returns the specified <see cref="T:System.String" /> converted to a <see cref="T:System.Int16" />
value.</para>
</summary>
<returns>
<para>The <see cref="T:System.Int16" /> value obtained from <paramref name="s" />.</para>
</returns>
<remarks>
<para>The string <paramref name="s" /> is parsed using the
culture-specific formatting information from the <see cref="T:System.Globalization.NumberFormatInfo" />
instance supplied by <paramref name="fp" />. If <paramref name="fp" /> is
<see langword="null" /> or a
<see cref="T:System.Globalization.NumberFormatInfo" />
cannot be obtained from <paramref name="fp" />, the formatting information for the
current system culture is used.</para>
<paramref name="" />
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is a null reference.</exception>
<exception cref="T:System.FormatException">
<paramref name="s" /> is not in the correct style.</exception>
<exception cref="T:System.OverflowException">
<paramref name="s" /> represents a number greater than <see cref="F:System.Int16.MaxValue" /> or less than <see cref="F:System.Int16.MinValue" />.</exception>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToBoolean">
<MemberSignature Language="C#" Value="bool IConvertible.ToBoolean (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToByte">
<MemberSignature Language="C#" Value="byte IConvertible.ToByte (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Byte</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToChar">
<MemberSignature Language="C#" Value="char IConvertible.ToChar (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Char</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToDateTime">
<MemberSignature Language="C#" Value="DateTime IConvertible.ToDateTime (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToDecimal">
<MemberSignature Language="C#" Value="decimal IConvertible.ToDecimal (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Decimal</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToDouble">
<MemberSignature Language="C#" Value="double IConvertible.ToDouble (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToInt16">
<MemberSignature Language="C#" Value="short IConvertible.ToInt16 (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int16</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToInt32">
<MemberSignature Language="C#" Value="int IConvertible.ToInt32 (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToInt64">
<MemberSignature Language="C#" Value="long IConvertible.ToInt64 (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToSByte">
<MemberSignature Language="C#" Value="sbyte IConvertible.ToSByte (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.SByte</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToSingle">
<MemberSignature Language="C#" Value="float IConvertible.ToSingle (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Single</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToType">
<MemberSignature Language="C#" Value="object IConvertible.ToType (Type conversionType, IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="conversionType" Type="System.Type" />
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="conversionType">To be added.</param>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToUInt16">
<MemberSignature Language="C#" Value="ushort IConvertible.ToUInt16 (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt16</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToUInt32">
<MemberSignature Language="C#" Value="uint IConvertible.ToUInt32 (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.IConvertible.ToUInt64">
<MemberSignature Language="C#" Value="ulong IConvertible.ToUInt64 (IFormatProvider provider);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt64</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="provider" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual string ToString()" />
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Returns a <see cref="T:System.String" /> representation of the value of the current instance. </para>
</summary>
<returns>
<para>A <see cref="T:System.String" /> representation of the current instance formatted using
the general format specifier ("G"). The string takes into account the current
system culture.</para>
</returns>
<remarks>
<para>This version of <see cref="M:System.Int16.ToString" /> is equivalent to <see cref="M:System.Int16.ToString" />(<see langword="null" />, <see langword="null" />).</para>
<para>
<block subset="none" type="note">This method
overrides <see cref="M:System.Object.ToString" />.</block>
</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="ILASM" Value=".method public final hidebysig virtual string ToString(class System.IFormatProvider provider)" />
<MemberSignature Language="C#" Value="public string ToString (IFormatProvider fp);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="fp" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="fp">A <see cref="T:System.IFormatProvider" /> that supplies a <see cref="T:System.Globalization.NumberFormatInfo" /> containing culture-specific formatting information.</param>
<summary>
<para>Returns a <see cref="T:System.String" /> representation of the value of the current instance.</para>
</summary>
<returns>
<para>A <see cref="T:System.String" /> representation of the current instance formatted using
the general format specifier, ("G"). The string takes into account the
formatting information in the <see cref="T:System.Globalization.NumberFormatInfo" /> instance supplied by
<paramref name="provider" />.</para>
</returns>
<remarks>
<para>This version of <see cref="M:System.Int16.ToString" /> is equivalent to <see cref="M:System.Int16.ToString" />("G",
<paramref name="provider" />).</para>
<para>If <paramref name="provider" /> is
<see langword="null" /> or a <see cref="T:System.Globalization.NumberFormatInfo" /> cannot
be obtained from <paramref name="provider" />, the formatting information for the current
system culture is used.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance string ToString(string format)" />
<MemberSignature Language="C#" Value="public string ToString (string format);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="format" Type="System.String" />
</Parameters>
<Docs>
<param name="format">A <see cref="T:System.String" /> that specifies the format of the returned string. <block subset="none" type="note">For a list of valid values, see <see cref="M:System.Int16.ToString" />(<see cref="T:System.String" />, <see cref="T:System.IFormatProvider" />).</block></param>
<summary>
<para>Returns a <see cref="T:System.String" /> representation of the value of the current instance.</para>
</summary>
<returns>
<para>A <see cref="T:System.String" /> representation of the current instance formatted as
specified by <paramref name="format" />. The string takes into account the current system culture.</para>
</returns>
<remarks>
<para>This version of <see cref="M:System.Int16.ToString" /> is equivalent to <see cref="M:System.Int16.ToString" />(<paramref name="format" />, null).</para>
<para>If <paramref name="format" /> is a null reference, the general
format specifier "G" is used.</para>
</remarks>
<exception cref="T:System.FormatException">
<paramref name="format" /> is invalid.</exception>
<example>
<para>This example demonstrates converting a <see cref="T:System.Int16" /> to a string.</para>
<code lang="C#">using System;
public class Int16ToStringExample {
public static void Main() {
Int16 i = 16;
Console.WriteLine(i);
string[] formats = {"c", "d", "e", "f", "g", "n", "p", "x" };
foreach(string str in formats)
Console.WriteLine("{0}: {1}", str, i.ToString(str));
}
}
</code>
<para>The output is</para>
<c>
<para>16</para>
<para>c: $16.00</para>
<para>d: 16</para>
<para>e: 1.600000e+001</para>
<para>f: 16.00</para>
<para>g: 16</para>
<para>n: 16.00</para>
<para>p: 1,600.00 %</para>
<para>x: 10</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="ILASM" Value=".method public final hidebysig virtual string ToString(string format, class System.IFormatProvider provider)" />
<MemberSignature Language="C#" Value="public string ToString (string format, IFormatProvider fp);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="format" Type="System.String" />
<Parameter Name="fp" Type="System.IFormatProvider" />
</Parameters>
<Docs>
<param name="format">A <see cref="T:System.String" /> containing a character that specifies the format of the returned string.</param>
<param name="fp">A <see cref="T:System.IFormatProvider" /> that supplies a <see cref="T:System.Globalization.NumberFormatInfo" /> instance containing culture-specific formatting information.</param>
<param name="format">To be added.</param>
<summary>
<para>Returns a <see cref="T:System.String" /> representation of the value of
the current instance. </para>
</summary>
<returns>
<para>A <see cref="T:System.String" /> representation of the current instance formatted as
specified by <paramref name="format" />. The string takes into account the formatting
information in the <see cref="T:System.Globalization.NumberFormatInfo" /> instance supplied by <paramref name="fp" />.</para>
</returns>
<remarks>
<para>If <paramref name="fp" /> is
<see langword="null" /> or a <see cref="T:System.Globalization.NumberFormatInfo" /> cannot
be obtained from <paramref name="fp" />, the formatting information for the current
system culture is used.</para>
<para>If <paramref name="format" /> is a null reference, the general
format specifier "G" is used.</para>
<block subset="none" type="note">
<para> For a
detailed description of formatting, see the <see cref="T:System.IFormattable" /> interface.</para>
<para> This method is implemented
to support the <see cref="T:System.IFormattable" /> interface.</para>
</block>
<para>The following table lists the characters that are valid for the <see cref="T:System.Int16" /> type.</para>
<list type="table">
<listheader>
<term>Format Characters</term>
<description>Description</description>
</listheader>
<item>
<term> "C", "c"</term>
<description>Currency format.</description>
</item>
<item>
<term> "D", "d"</term>
<description>Decimal format.</description>
</item>
<item>
<term> "E", "e"</term>
<description>Exponential notation format.</description>
</item>
<item>
<term> "F", "f"</term>
<description>Fixed-point format.</description>
</item>
<item>
<term> "G", "g"</term>
<description>General format.</description>
</item>
<item>
<term> "N", "n"</term>
<description>Number format.</description>
</item>
<item>
<term> "P", "p"</term>
<description>Percent format.</description>
</item>
<item>
<term> "X", "x"</term>
<description>Hexadecimal format.</description>
</item>
</list>
</remarks>
<exception cref="T:System.FormatException">
<paramref name="format" /> is invalid.</exception>
</Docs>
<Excluded>0</Excluded>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="TryParse">
<MemberSignature Language="C#" Value="public static bool TryParse (string s, out short result);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="result" Type="System.Int16&" RefType="out" />
</Parameters>
<Docs>
<param name="s">To be added.</param>
<param name="result">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="TryParse">
<MemberSignature Language="C#" Value="public static bool TryParse (string s, System.Globalization.NumberStyles style, IFormatProvider provider, out short result);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="style" Type="System.Globalization.NumberStyles" />
<Parameter Name="provider" Type="System.IFormatProvider" />
<Parameter Name="result" Type="System.Int16&" RefType="out" />
</Parameters>
<Docs>
<param name="s">To be added.</param>
<param name="style">To be added.</param>
<param name="provider">To be added.</param>
<param name="result">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
<TypeExcluded>0</TypeExcluded>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
</Type>
|