Environment.NewLine プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)


NewLine プロパティの値には、使用しているプラットフォームおよび .NET Framework の実装に応じて決まった値が格納されます。プロパティ値におけるエスケープ文字の詳細については、「文字のエスケープ」を参照してください。
NewLine は、改行 (Newline)、ライン フィード (Line Feed)、改行 (Line Break)、復帰 (Carriage Return)、CRLF、行末 (End Of Line) などの用語で表される機能を提供します。
NewLine と、言語に固有の改行機能 (Microsoft C#/C/C++ では '\r' や '\n' などのエスケープ文字、Microsoft Visual Basic では vbCrLf) とを組み合わせて使用することもできます。
System.Console.WriteLine メソッドおよび System.Text.StringBuilder.AppendLine メソッドによって処理されたテキストの最後には、NewLine が自動的に付加されます。

' Sample for the Environment.NewLine property Imports System Class Sample Public Shared Sub Main() Console.WriteLine() Console.WriteLine("NewLine: {0} first line{0} second line{0} third line", _ Environment.NewLine) End Sub 'Main End Class 'Sample ' 'This example produces the following results: ' 'NewLine: ' first line ' second line ' third line '
// Sample for the Environment.NewLine property using System; class Sample { public static void Main() { Console.WriteLine(); Console.WriteLine("NewLine: {0} first line{0} second line{0} third line" , Environment.NewLine); } } /* This example produces the following results: NewLine: first line second line third line */
// Sample for the Environment::NewLine property using namespace System; int main() { Console::WriteLine(); Console::WriteLine( "NewLine: {0} first line {0} second line {0} third line", Environment::NewLine ); } /* This example produces the following results: NewLine: first line second line third line */
// Sample for the Environment.NewLine property import System.*; class Sample { public static void main(String[] args) { Console.WriteLine(); Console.WriteLine("NewLine: {0} first line{0} second line{0}" + " third line", Environment.get_NewLine()); } //main } //Sample /* This example produces the following results: NewLine: first line second line third line */

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からEnvironment.NewLine プロパティを検索する場合は、下記のリンクをクリックしてください。

- Environment.NewLine プロパティのページへのリンク