Source.GetNewLine(Int32) 方法

定义

获取在指定行的末尾使用的换行符。

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

要从中获取换行符的行号。

返回

String

行末尾的换行符。

注解

此方法对 GetLineDataEx IVsTextLines 传递给类构造函数的对象调用方法 Source 。 根据的返回值 GetLineDataEx ,确定相应的字符串。 可能的返回值为 "\r\n" (默认) "\r" (回车) ,"\n" (^) ,"\u2028" (Unicode 行分隔符) ,"\u2029" (Unicode 段落分隔符) 。

如果行号超出范围,则会引发异常。

适用于