免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
Board logo

標題: VB.NET 固定字串長度 [打印本頁]

作者: mhfo    時間: 2013-10-29 12:20     標題: VB.NET 固定字串長度

在VB.NET中使用固定长度的String在结构中会出现一些问题,所以建议不要在VB.NET中使用固定长度的String,


The String class does support fixed-length strings.  See below.

You should use the Format method on String to create your fixed length
string.  For example,
String.Format( "|{0,-20}|", "This is a test")
will produce a left-justified fixed length string of 20 characters (the
minus sign on the 20 indicates left justify) as follows:

http://computer-programming-foru ... 16c901b89d355ae.htm




歡迎光臨 魚骨頭的雲端圖書館 (http://mhfo.hotbbs.info/) Powered by Discuz! 7.0.0