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 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="StringReader" FullName="System.IO.StringReader" FullNameSP="System_IO_StringReader" Maintainer="ecma">
<TypeSignature Language="ILASM" Value=".class public serializable StringReader extends System.IO.TextReader" />
<TypeSignature Language="C#" Value="public class StringReader : System.IO.TextReader" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit StringReader extends System.IO.TextReader" />
<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>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
<Base>
<BaseTypeName>System.IO.TextReader</BaseTypeName>
</Base>
<Interfaces>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The following table lists examples of other typical or related I/O tasks.</para>
<list type="table">
<listheader>
<item>
<term>
<para>To do this... </para>
</term>
<description>
<para>See the example in this topic... </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Create a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Read from a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Append text to a file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="74423362-1721-49CB-AA0A-E04005F72A06">[<topic://cpconopeningappendingtologfile>]</a>
</format> </para>
<para>
<see cref="M:System.IO.File.AppendText(System.String)" /> </para>
<para>
<see cref="M:System.IO.FileInfo.AppendText" /> </para>
</description>
</item>
<item>
<term>
<para>Get the size of a file. </para>
</term>
<description>
<para>
<see cref="P:System.IO.FileInfo.Length" /> </para>
</description>
</item>
<item>
<term>
<para>Get the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.GetAttributes(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Set the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /> </para>
</description>
</item>
<item>
<term>
<para>Determine if a file exists. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.Exists(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Read from a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Implements a <see cref="T:System.IO.TextReader" /> that reads from a string.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string s)" />
<MemberSignature Language="C#" Value="public StringReader (string s);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string s) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue />
<Parameters>
<Parameter Name="s" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is <see langword="null" />.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The following table lists examples of other typical or related I/O tasks.</para>
<list type="table">
<listheader>
<item>
<term>
<para>To do this... </para>
</term>
<description>
<para>See the example in this topic... </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Create a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Read from a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Append text to a file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="74423362-1721-49CB-AA0A-E04005F72A06">[<topic://cpconopeningappendingtologfile>]</a>
</format> </para>
<para>
<see cref="M:System.IO.File.AppendText(System.String)" /> </para>
<para>
<see cref="M:System.IO.FileInfo.AppendText" /> </para>
</description>
</item>
<item>
<term>
<para>Get the size of a file. </para>
</term>
<description>
<para>
<see cref="P:System.IO.FileInfo.Length" /> </para>
</description>
</item>
<item>
<term>
<para>Get the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.GetAttributes(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Set the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /> </para>
</description>
</item>
<item>
<term>
<para>Determine if a file exists. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.Exists(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Read from a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.IO.StringReader" /> class that reads from the specified string.</para>
</summary>
<param name="s">
<attribution license="cc4" from="Microsoft" modified="false" />The string to which the <see cref="T:System.IO.StringReader" /> should be initialized. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Close">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual void Close()" />
<MemberSignature Language="C#" Value="public override void Close ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Close() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>For an example of creating a file and writing text to a file, see <format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a></format>. For an example of reading text from a file, see <format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a></format>. For an example of reading from and writing to a binary file, see <format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a></format>.</para>
<para>This method overrides the <see cref="M:System.IO.Stream.Close" /> method.</para>
<para>This implementation of Close calls the <see cref="M:System.IO.StringReader.Dispose(System.Boolean)" /> method passing a true value.</para>
<para>Flushing the stream will not flush its underlying encoder unless you explicitly call Close. Setting <see cref="P:System.IO.StreamWriter.AutoFlush" /> to true means that data will be flushed from the buffer to the stream, but the encoder state will not be flushed. This allows the encoder to keep its state (partial characters) so that it can encode the next block of characters correctly. This scenario affects UTF8 and UTF7 where certain characters can only be encoded after the encoder receives the adjacent character or characters.</para>
<para>Following a call to Close, other methods might throw an exception.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Closes the <see cref="T:System.IO.StringReader" />.</para>
</summary>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="ILASM" Value=".method family hidebysig virtual void Dispose(bool disposing)" />
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.IO.StringReader" /> references. This method invokes the Dispose method of each referenced object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Releases the unmanaged resources used by the <see cref="T:System.IO.StringReader" /> and optionally releases the managed resources.</para>
</summary>
<param name="disposing">
<attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Peek">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 Peek()" />
<MemberSignature Language="C#" Value="public override int Peek ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 Peek() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.IO.StringReader.Peek" /> method returns an integer value in order to determine whether the end of the file, or another error has occurred. This allows a user to first check if the returned value is -1 before casting it to a <see cref="T:System.Char" /> type.</para>
<para>This method overrides the <see cref="M:System.IO.TextReader.Peek" /> method.</para>
<para>The current position of the StringReader is not changed by this operation.</para>
<para>The following table lists examples of other typical or related I/O tasks.</para>
<list type="table">
<listheader>
<item>
<term>
<para>To do this... </para>
</term>
<description>
<para>See the example in this topic... </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Create a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Read from a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Get the size of a file. </para>
</term>
<description>
<para>
<see cref="P:System.IO.FileInfo.Length" /> </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the next available character but does not consume it.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An integer representing the next character to be read, or -1 if no more characters are available or the stream does not support seeking.</para>
</returns>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Read">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 Read()" />
<MemberSignature Language="C#" Value="public override int Read ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 Read() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method overrides the <see cref="M:System.IO.TextReader.Read" /> method.</para>
<para>The following table lists examples of other typical or related I/O tasks.</para>
<list type="table">
<listheader>
<item>
<term>
<para>To do this... </para>
</term>
<description>
<para>See the example in this topic... </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Create a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Read from a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Append text to a file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="74423362-1721-49CB-AA0A-E04005F72A06">[<topic://cpconopeningappendingtologfile>]</a>
</format> </para>
<para>
<see cref="M:System.IO.File.AppendText(System.String)" /> </para>
<para>
<see cref="M:System.IO.FileInfo.AppendText" /> </para>
</description>
</item>
<item>
<term>
<para>Get the size of a file. </para>
</term>
<description>
<para>
<see cref="P:System.IO.FileInfo.Length" /> </para>
</description>
</item>
<item>
<term>
<para>Get the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.GetAttributes(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Set the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /> </para>
</description>
</item>
<item>
<term>
<para>Determine if a file exists. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.Exists(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Read from a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads the next character from the input string and advances the character position by one character.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The next character from the underlying string, or -1 if no more characters are available.</para>
</returns>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Read">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 Read(class System.Char[] buffer, int32 index, int32 count)" />
<MemberSignature Language="C#" Value="public override int Read (char[] buffer, int index, int count);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 Read(char[] buffer, int32 index, int32 count) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="buffer" Type="System.Char[]" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<paramref name="buffer " /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">(<paramref name="index" /> + <paramref name="count" /> ) > <paramref name="buffer" /><see langword="." />Length.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index " />< 0<paramref name=" " /></para>
<para>
<paramref name="-" /> or-</para>
<para>
<paramref name="count " /> < 0.</para>
</exception>
<exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method overrides <see cref="M:System.IO.TextReader.Read" />.</para>
<para>The method will read up to <paramref name="count" /> characters from the <see cref="T:System.IO.StringReader" /> into the <paramref name="buffer" /> character array starting at position <paramref name="index" />. Returns the actual number of characters read, or zero if the end of the string has been reached and no characters are read.</para>
<para>The following table lists examples of other typical or related I/O tasks.</para>
<list type="table">
<listheader>
<item>
<term>
<para>To do this... </para>
</term>
<description>
<para>See the example in this topic... </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Create a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Read from a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Append text to a file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="74423362-1721-49CB-AA0A-E04005F72A06">[<topic://cpconopeningappendingtologfile>]</a>
</format> </para>
<para>
<see cref="M:System.IO.File.AppendText(System.String)" /> </para>
<para>
<see cref="M:System.IO.FileInfo.AppendText" /> </para>
</description>
</item>
<item>
<term>
<para>Get the size of a file. </para>
</term>
<description>
<para>
<see cref="P:System.IO.FileInfo.Length" /> </para>
</description>
</item>
<item>
<term>
<para>Get the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.GetAttributes(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Set the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /> </para>
</description>
</item>
<item>
<term>
<para>Determine if a file exists. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.Exists(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Read from a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads a block of characters from the input string and advances the character position by <paramref name="count" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The total number of characters read into the buffer. This can be less than the number of characters requested if that many characters are not currently available, or zero if the end of the underlying string has been reached.</para>
</returns>
<param name="buffer">
<attribution license="cc4" from="Microsoft" modified="false" />When this method returns, contains the specified character array with the values between <paramref name="index" /> and (<paramref name="index" /> + <paramref name="count" /> - 1) replaced by the characters read from the current source. </param>
<param name="index">
<attribution license="cc4" from="Microsoft" modified="false" />The starting index in the buffer. </param>
<param name="count">
<attribution license="cc4" from="Microsoft" modified="false" />The number of characters to read. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="ReadAsync">
<MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task<int> ReadAsync (char[] buffer, int index, int count);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1<int32> ReadAsync(char[] buffer, int32 index, int32 count) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.Int32></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="buffer" Type="System.Char[]" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The task completes after either the number of characters specified by the <paramref name="count" /> parameter are read or the end of the string is reached. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads a specified maximum number of characters from the current string asynchronously and writes the data to a buffer, beginning at the specified index. </para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the string has been reached.</para>
</returns>
<param name="buffer">
<attribution license="cc4" from="Microsoft" modified="false" />When this method returns, contains the specified character array with the values between <paramref name="index" /> and (<paramref name="index" /> + <paramref name="count" /> - 1) replaced by the characters read from the current source.</param>
<param name="index">
<attribution license="cc4" from="Microsoft" modified="false" />The position in <paramref name="buffer" /> at which to begin writing.</param>
<param name="count">
<attribution license="cc4" from="Microsoft" modified="false" />The maximum number of characters to read. If the end of the string is reached before the specified number of characters is written into the buffer, the method returns.</param>
</Docs>
</Member>
<Member MemberName="ReadBlockAsync">
<MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task<int> ReadBlockAsync (char[] buffer, int index, int count);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1<int32> ReadBlockAsync(char[] buffer, int32 index, int32 count) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.Int32></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="buffer" Type="System.Char[]" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The task does not complete until either the number of characters specified by the <paramref name="count" /> parameter are read, or the end of the string has been reached.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads a specified maximum number of characters from the current string asynchronously and writes the data to a buffer, beginning at the specified index.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the string has been reached.</para>
</returns>
<param name="buffer">
<attribution license="cc4" from="Microsoft" modified="false" />When this method returns, contains the specified character array with the values between <paramref name="index" /> and (<paramref name="index" /> + <paramref name="count" /> - 1) replaced by the characters read from the current source.</param>
<param name="index">
<attribution license="cc4" from="Microsoft" modified="false" />The position in <paramref name="buffer" /> at which to begin writing.</param>
<param name="count">
<attribution license="cc4" from="Microsoft" modified="false" />The maximum number of characters to read. If the end of the string is reached before the specified number of characters is written into the buffer, the method returns.</param>
</Docs>
</Member>
<Member MemberName="ReadLine">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual string ReadLine()" />
<MemberSignature Language="C#" Value="public override string ReadLine ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ReadLine() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception>
<exception cref="T:System.OutOfMemoryException">There is insufficient memory to allocate a buffer for the returned string.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method overrides the <see cref="M:System.IO.TextReader.ReadLine" /> method.</para>
<para>A line is defined as a sequence of characters followed by a line feed ("\n"), a carriage return ("\r"), or a carriage return immediately followed by a line feed ("\r\n"). The string that is returned does not contain the terminating carriage return or line feed. The returned value is null if the end of the string has been reached.</para>
<para>If the current method throws an <see cref="T:System.OutOfMemoryException" />, the reader's position in the underlying string is advanced by the number of characters the method was able to read, but the characters already read into the internal <see cref="M:System.IO.StringReader.ReadLine" /> buffer are discarded. Because the position of the reader in the string cannot be changed, the characters already read are unrecoverable, and can be accessed only by reinitializing the <see cref="T:System.IO.StringReader" />. To avoid such a situation, use the <see cref="M:System.IO.StringReader.Read" /> method and store the read characters in a preallocated buffer.</para>
<para>The following table lists examples of other typical or related I/O tasks.</para>
<list type="table">
<listheader>
<item>
<term>
<para>To do this... </para>
</term>
<description>
<para>See the example in this topic... </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Create a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Read from a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Append text to a file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="74423362-1721-49CB-AA0A-E04005F72A06">[<topic://cpconopeningappendingtologfile>]</a>
</format> </para>
<para>
<see cref="M:System.IO.File.AppendText(System.String)" /> </para>
<para>
<see cref="M:System.IO.FileInfo.AppendText" /> </para>
</description>
</item>
<item>
<term>
<para>Get the size of a file. </para>
</term>
<description>
<para>
<see cref="P:System.IO.FileInfo.Length" /> </para>
</description>
</item>
<item>
<term>
<para>Get the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.GetAttributes(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Set the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /> </para>
</description>
</item>
<item>
<term>
<para>Determine if a file exists. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.Exists(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Read from a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads a line of characters from the current string and returns the data as a string.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The next line from the current string, or null if the end of the string is reached.</para>
</returns>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="ReadLineAsync">
<MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task<string> ReadLineAsync ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1<string> ReadLineAsync() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.String></ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads a line of characters asynchronously from the current string and returns the data as a string.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the next line from the string reader, or is null if all the characters have been read.</para>
</returns>
</Docs>
</Member>
<Member MemberName="ReadToEnd">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual string ReadToEnd()" />
<MemberSignature Language="C#" Value="public override string ReadToEnd ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ReadToEnd() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception>
<exception cref="T:System.OutOfMemoryException">There is insufficient memory to allocate a buffer for the returned string.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method overrides the <see cref="M:System.IO.TextReader.ReadToEnd" /> method.</para>
<para>If the current method throws an <see cref="T:System.OutOfMemoryException" />, the reader's position in the underlying string is advanced by the number of characters the method was able to read, but the characters already read into the internal <see cref="M:System.IO.StringReader.ReadToEnd" /> buffer are discarded. Because the position of the reader in the string cannot be changed, the characters already read are unrecoverable, and can be accessed only by reinitializing the <see cref="T:System.IO.StringReader" />. To avoid such a situation, use the <see cref="M:System.IO.StringReader.Read" /> method and store the read characters in a preallocated buffer.</para>
<para>The following table lists examples of other typical or related I/O tasks.</para>
<list type="table">
<listheader>
<item>
<term>
<para>To do this... </para>
</term>
<description>
<para>See the example in this topic... </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Create a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[<topic://cpconwritingtexttofile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Read from a text file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[<topic://cpconreadingtextfromfile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Append text to a file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="74423362-1721-49CB-AA0A-E04005F72A06">[<topic://cpconopeningappendingtologfile>]</a>
</format> </para>
<para>
<see cref="M:System.IO.File.AppendText(System.String)" /> </para>
<para>
<see cref="M:System.IO.FileInfo.AppendText" /> </para>
</description>
</item>
<item>
<term>
<para>Get the size of a file. </para>
</term>
<description>
<para>
<see cref="P:System.IO.FileInfo.Length" /> </para>
</description>
</item>
<item>
<term>
<para>Get the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.GetAttributes(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Set the attributes of a file. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /> </para>
</description>
</item>
<item>
<term>
<para>Determine if a file exists. </para>
</term>
<description>
<para>
<see cref="M:System.IO.File.Exists(System.String)" /> </para>
</description>
</item>
<item>
<term>
<para>Read from a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
<item>
<term>
<para>Write to a binary file. </para>
</term>
<description>
<para>
<format type="text/html">
<a href="E209D949-31E8-44EA-8E38-87F9093F3093">[<topic://cpconReadingWritingToNewlyCreatedDataFile>]</a>
</format> </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads all characters from the current position to the end of the string and returns them as a single string.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The content from the current position to the end of the underlying string.</para>
</returns>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="ReadToEndAsync">
<MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task<string> ReadToEndAsync ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1<string> ReadToEndAsync() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.String></ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Reads all characters from the current position to the end of the string asynchronously and returns them as a single string.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains a string with the characters from the current position to the end of the string. </para>
</returns>
</Docs>
</Member>
</Members>
<TypeExcluded>0</TypeExcluded>
</Type>
|