ReadString Reads a string from the formatted read buffer. String ReadString(); String ReadString(Int32 count); Int32 ReadString(StringBuilder data); Int32 ReadString(StringBuilder data, Int32 count); Name Description Type A object created by the calling program data StringBuilder StringBuilder to hold the string to be read from the formatted read buffer. This method appends the output string to data. The number of characters to be read from the read buffer. count Int32 RETURN Type Description The string actually read from the formatted read buffer. String The number of characters actually appended to the parameter. Int32 StringBuilder The method implementations exhibit exactly the same behavior (but not necessarily ReadString implementated exactly as shown) as a corresponding call to as shown in the following table. Scanf, ReadString Method Equivalent Scanf Call Scanf(“%s”, out result); String ReadString(); (return result) Scanf(“%s”, out data); Int32 ReadString(StringBuilder data); (return data.Length) Scanf(“%#s”, count, out result); String ReadString(Int32 count); (return result) Scanf(“%#s”, count, out data); Int32 ReadString(StringBuilder data, (return Int32 count); data.Length)
ReadString Reads a string from the formatted read buffer. String ReadString(); String ReadString(Int32 count); Int32 ReadString(StringBuilder data); Int32 ReadString(StringBuilder data, Int32 count); Name Description Type data A StringBuilder object created by the calling program to hold the string to be read from the formatted read buffer. This method appends the output string to data. StringBuilder count The number of characters to be read from the read buffer. Int32 RETURN Type Description String The string actually read from the formatted read buffer. Int32 The number of characters actually appended to the StringBuilder parameter. The ReadString method implementations exhibit exactly the same behavior (but not necessarily implementated exactly as shown) as a corresponding call to Scanf, as shown in the following table. ReadString Method Equivalent Scanf Call String ReadString(); Scanf(“%s”, out result); (return result) Int32 ReadString(StringBuilder data); Scanf(“%s”, out data); (return data.Length) String ReadString(Int32 count); Scanf(“%#s”, count, out result); (return result) Int32 ReadString(StringBuilder data, Int32 count); Scanf(“%#s”, count, out data); (return data.Length)
vpp436_2015-02-11.docx