Source.GetNewLine(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取在指定行的末尾使用的换行符。
public:
System::String ^ GetNewLine(int line);
public:
Platform::String ^ GetNewLine(int line);
std::wstring GetNewLine(int line);
public string GetNewLine (int line);
member this.GetNewLine : int -> string
Public Function GetNewLine (line As Integer) As String
参数
- line
- Int32
要从中获取换行符的行号。
返回
行末尾的换行符。
注解
此方法对 GetLineDataEx IVsTextLines 传递给类构造函数的对象调用方法 Source 。 根据的返回值 GetLineDataEx ,确定相应的字符串。 可能的返回值为 "\r\n" (默认) "\r" (回车) ,"\n" (^) ,"\u2028" (Unicode 行分隔符) ,"\u2029" (Unicode 段落分隔符) 。
如果行号超出范围,则会引发异常。