Environment.SystemDirectory プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Environment.SystemDirectory プロパティの意味・解説 

Environment.SystemDirectory プロパティ

システム ディレクトリ絶対パス取得します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Shared ReadOnly Property
 SystemDirectory As String
Dim value As String

value = Environment.SystemDirectory
public static string SystemDirectory
 { get; }
public:
static property String^ SystemDirectory {
    String^ get ();
}
/** @property */
public static String get_SystemDirectory ()

プロパティ
ディレクトリパス格納している文字列

解説解説

戻り値は、"C:\WinNT\System32" などの文字列です。

使用例使用例

コード例実行しているコンピュータシステム ディレクトリ表示するコード例次に示します。(コード例出力結果は、セキュリティ上の理由により、システム ディレクトリ省略して記載してます。)

' Sample for the Environment.SystemDirectory property
Imports System

Class Sample
   Public Shared Sub Main()
      Console.WriteLine()
      '  <-- Keep this information secure! -->
      Console.WriteLine("SystemDirectory: {0}", Environment.SystemDirectory)
   End Sub 'Main
End Class 'Sample
'
'This example produces the following results:
'
'SystemDirectory: C:\WINNT\System32
'
// Sample for the Environment.SystemDirectory property
using System;

class Sample 
{
    public static void Main()
 
    {
    Console.WriteLine();
//  <-- Keep this information secure! -->
    Console.WriteLine("SystemDirectory: {0}", Environment.SystemDirectory);
    }
}
/*
This example produces the following results:

SystemDirectory: C:\WINNT\System32
*/
// Sample for the Environment::SystemDirectory property
using namespace System;
int main()
{
   Console::WriteLine();
   
   //  <-- Keep this information secure! -->
   Console::WriteLine( "SystemDirectory: {0}", Environment::SystemDirectory
 );
}

/*
This example produces the following results:

SystemDirectory: C:\WINNT\System32
*/
// Sample for the Environment.SystemDirectory property

import System.*;

class Sample
{
    public static void main(String[]
 args)
    {
        Console.WriteLine();
        //  <-- Keep this information secure! -->
        Console.WriteLine("SystemDirectory: {0}", 
            Environment.get_SystemDirectory());
    } //main
} //Sample

/*
This example produces the following results:

SystemDirectory: C:\WINDOWS\System32
*/
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Environment.SystemDirectory プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Environment.SystemDirectory プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS