Operating_systemとは? わかりやすく解説

OperatingSystem クラス

バージョンプラットフォーム ID など、オペレーティング システムについての情報表します。このクラス継承できません。

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

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class
 OperatingSystem
    Implements ICloneable, ISerializable
Dim instance As OperatingSystem
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public sealed class OperatingSystem : ICloneable,
 ISerializable
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class OperatingSystem sealed : ICloneable,
 ISerializable
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class OperatingSystem implements
 ICloneable, ISerializable
SerializableAttribute 
ComVisibleAttribute(true) 
public final class OperatingSystem implements
 ICloneable, ISerializable
解説解説
使用例使用例

選択した値を Platform プロパティVersion プロパティ使用してOperatingSystem クラスオブジェクト作成するコード例次に示します

' Example for the OperatingSystem constructor and the  
' OperatingSystem.ToString( ) method.
Imports System
Imports Microsoft.VisualBasic

Module OpSysConstructDemo
    
    ' Create and display an OperatingSystem object.
    Sub BuildOSObj( pID As PlatformID, ver
 As Version )

        Dim os As New OperatingSystem(
 pID, ver )

        Console.WriteLine( "   {0}", os.ToString(
 ) )
    End Sub 
        
    Sub BuildOperatingSystemObjects( )

        ' The Version object does not need to correspond to an 
        ' actual OS version.
        Dim verNull     As New
 Version( )
        Dim verMajMin   As New
 Version( 3, 11 )
        Dim verMMBld    As New
 Version( 5, 25, 625 )
        Dim verMMBVer   As New
 Version( 5, 6, 7, 8 )
        Dim verString   As New
 Version( "3.5.8.13" )
            
        ' All PlatformID members are shown here.
        BuildOSObj( PlatformID.Win32NT, verNull )
        BuildOSObj( PlatformID.Win32S, verMajMin )
        BuildOSObj( PlatformID.Win32Windows, verMMBld )
        BuildOSObj( PlatformID.WinCE, verMMBVer )
        BuildOSObj( PlatformID.Win32NT, verString )
    End Sub 
        
    Sub Main( )
        Console.WriteLine( _
            "This example of the OperatingSystem constructor "
 & _
            "and " & vbCrLf & "OperatingSystem.ToString(
 ) " & _
            "generates the following output." &
 vbCrLf )
        Console.WriteLine( _
            "Create and display several different "
 & _
            "OperatingSystem objects:" & vbCrLf
 )

        BuildOperatingSystemObjects( )
            
        Console.WriteLine(vbCrLf & _
            "The OS version of the host computer is: "
 & _
            vbCrLf & vbCrLf & "   {0}", _
            Environment.OSVersion.ToString( ) )
    End Sub
End Module 

' This example of the OperatingSystem constructor and
' OperatingSystem.ToString( ) generates the following output.
' 
' Create and display several different OperatingSystem objects:
' 
'    Microsoft Windows NT 0.0
'    Microsoft Win32S 3.11
'    Microsoft Windows 98 5.25.625
'    Microsoft Windows CE 5.6.7.8
'    Microsoft Windows NT 3.5.8.13
' 
' The OS version of the host computer is:
' 
'    Microsoft Windows NT 5.1.2600.0
// Example for the OperatingSystem constructor and the 
// OperatingSystem.ToString( ) method.
using System;

class OpSysConstructDemo 
{
    // Create and display an OperatingSystem object.
    static void BuildOSObj( PlatformID pID,
 Version ver )
    {
        OperatingSystem os = new OperatingSystem( pID, ver );

        Console.WriteLine( "   {0}", os.ToString( ) );
    }

    static void BuildOperatingSystemObjects(
 )
    {
        // The Version object does not need to correspond to an 
        // actual OS version.
        Version verNull     = new Version( );
        Version verMajMin   = new Version( 3, 11 );
        Version verMMBld    = new Version( 5, 25, 625 );
        Version verMMBVer   = new Version( 5, 6, 7, 8 );
        Version verString   = new Version( "3.5.8.13"
 );

        // All PlatformID members are shown here.
        BuildOSObj( PlatformID.Win32NT, verNull );
        BuildOSObj( PlatformID.Win32S, verMajMin );
        BuildOSObj( PlatformID.Win32Windows, verMMBld );
        BuildOSObj( PlatformID.WinCE, verMMBVer );
        BuildOSObj( PlatformID.Win32NT, verString );
    }

    public static void Main(
 ) 
    {
        Console.WriteLine( 
            "This example of the OperatingSystem constructor " +
            "and \nOperatingSystem.ToString( ) " +
            "generates the following output.\n" );
        Console.WriteLine( 
            "Create and display several different " +
            "OperatingSystem objects:\n" );

        BuildOperatingSystemObjects( );

        Console.WriteLine( 
            "\nThe OS version of the host computer is:\n\n   {0}", 
            Environment.OSVersion.ToString( ) );
    }
}

/*
This example of the OperatingSystem constructor and
OperatingSystem.ToString( ) generates the following output.

Create and display several different OperatingSystem objects:

   Microsoft Windows NT 0.0
   Microsoft Win32S 3.11
   Microsoft Windows 98 5.25.625
   Microsoft Windows CE 5.6.7.8
   Microsoft Windows NT 3.5.8.13

The OS version of the host computer is:

   Microsoft Windows NT 5.1.2600.0
*/
// Example for the OperatingSystem constructor and the 
// OperatingSystem::ToString( ) method.
using namespace System;

// Create and display an OperatingSystem object.
void BuildOSObj( PlatformID pID, Version^ ver )
{
   OperatingSystem^ os = gcnew OperatingSystem( pID,ver );
   Console::WriteLine( "   {0}", os->ToString() );
}

void BuildOperatingSystemObjects()
{
   
   // The Version object does not need to correspond to an 
   // actual OS version.
   Version^ verNull = gcnew Version;
   Version^ verMajMin = gcnew Version( 3,11 );
   Version^ verMMBld = gcnew Version( 5,25,625 );
   Version^ verMMBVer = gcnew Version( 5,6,7,8 );
   Version^ verString = gcnew Version( "3.5.8.13" );
   
   // All PlatformID members are shown here.
   BuildOSObj( PlatformID::Win32NT, verNull );
   BuildOSObj( PlatformID::Win32S, verMajMin );
   BuildOSObj( PlatformID::Win32Windows, verMMBld );
   BuildOSObj( PlatformID::WinCE, verMMBVer );
   BuildOSObj( PlatformID::Win32NT, verString );
}

int main()
{
   Console::WriteLine( "This example of the OperatingSystem constructor and
 \n"
   "OperatingSystem::ToString( ) generates the following "
   "output.\n" );
   Console::WriteLine( "Create and display several different "
   "OperatingSystem objects:\n" );
   BuildOperatingSystemObjects();
   Console::WriteLine( "\nThe OS version of the host computer is:\n\n   {0}",
 Environment::OSVersion->ToString() );
}

/*
This example of the OperatingSystem constructor and
OperatingSystem::ToString( ) generates the following output.

Create and display several different OperatingSystem objects:

   Microsoft Windows NT 0.0
   Microsoft Win32S 3.11
   Microsoft Windows 98 5.25.625
   Microsoft Windows CE 5.6.7.8
   Microsoft Windows NT 3.5.8.13

The OS version of the host computer is:

   Microsoft Windows NT 5.1.2600.0
*/
// Example for the OperatingSystem constructor and the 
// OperatingSystem.ToString( ) method.
import System.*;

class OpSysConstructDemo
{
    // Create and display an OperatingSystem object.
    static void BuildOSObj(PlatformID pID,
 Version ver)
    {
        OperatingSystem os = new OperatingSystem(pID, ver);
        Console.WriteLine("   {0}", os.ToString());
    } //BuildOSObj

    static void BuildOperatingSystemObjects()
    {
        // The Version object does not need to correspond to an 
        // actual OS version.
        Version verNull = new Version();
        Version verMajMin = new Version(3, 11);
        Version verMMBld = new Version(5, 25, 625);
        Version verMMBVer = new Version(5, 6, 7, 8);
        Version verString = new Version("3.5.8.13");

        // All PlatformID members are shown here.
        BuildOSObj(PlatformID.Win32NT, verNull);
        BuildOSObj(PlatformID.Win32S, verMajMin);
        BuildOSObj(PlatformID.Win32Windows, verMMBld);
        BuildOSObj(PlatformID.WinCE, verMMBVer);
        BuildOSObj(PlatformID.Win32NT, verString);
    } //BuildOperatingSystemObjects

    public static void main(String[]
 args)
    {
        Console.WriteLine(("This example of the OperatingSystem constructor
 " 
            + "and \nOperatingSystem.ToString( ) " 
            + "generates the following output.\n"));
        Console.WriteLine(("Create and display several different " 
            + "OperatingSystem objects:\n"));
        BuildOperatingSystemObjects();
        Console.WriteLine(
            "\nThe OS version of the host computer is:\n\n   {0}",
            Environment.get_OSVersion().ToString());
    } //main
} //OpSysConstructDemo

/*
This example of the OperatingSystem constructor and
OperatingSystem.ToString( ) generates the following output.

Create and display several different OperatingSystem objects:

   Microsoft Windows NT 0.0
   Microsoft Win32S 3.11
   Microsoft Windows 98 5.25.625
   Microsoft Windows CE 5.6.7.8
   Microsoft Windows NT 3.5.8.13

The OS version of the host computer is:

   Microsoft Windows NT 5.1.2600.0
*/
継承階層継承階層
System.Object
  System.OperatingSystem
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

OperatingSystem コンストラクタ

指定したプラットフォーム ID 値とバージョン オブジェクト使用し、OperatingSystem クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentNullException

versionnull 参照 (Visual Basic では Nothing) です。

ArgumentException

platformPlatformID 列挙値ではありません。

使用例使用例

選択した値を Platform プロパティVersion プロパティ使用してOperatingSystem クラスオブジェクト作成するコード例次に示します

' Example for the OperatingSystem constructor and the  
' OperatingSystem.ToString( ) method.
Imports System
Imports Microsoft.VisualBasic

Module OpSysConstructDemo
    
    ' Create and display an OperatingSystem object.
    Sub BuildOSObj( pID As PlatformID, ver
 As Version )

        Dim os As New OperatingSystem(
 pID, ver )

        Console.WriteLine( "   {0}", os.ToString(
 ) )
    End Sub 
        
    Sub BuildOperatingSystemObjects( )

        ' The Version object does not need to correspond to an 
        ' actual OS version.
        Dim verNull     As New
 Version( )
        Dim verMajMin   As New
 Version( 3, 11 )
        Dim verMMBld    As New
 Version( 5, 25, 625 )
        Dim verMMBVer   As New
 Version( 5, 6, 7, 8 )
        Dim verString   As New
 Version( "3.5.8.13" )
            
        ' All PlatformID members are shown here.
        BuildOSObj( PlatformID.Win32NT, verNull )
        BuildOSObj( PlatformID.Win32S, verMajMin )
        BuildOSObj( PlatformID.Win32Windows, verMMBld )
        BuildOSObj( PlatformID.WinCE, verMMBVer )
        BuildOSObj( PlatformID.Win32NT, verString )
    End Sub 
        
    Sub Main( )
        Console.WriteLine( _
            "This example of the OperatingSystem constructor "
 & _
            "and " & vbCrLf & "OperatingSystem.ToString(
 ) " & _
            "generates the following output." &
 vbCrLf )
        Console.WriteLine( _
            "Create and display several different "
 & _
            "OperatingSystem objects:" & vbCrLf
 )

        BuildOperatingSystemObjects( )
            
        Console.WriteLine(vbCrLf & _
            "The OS version of the host computer is: "
 & _
            vbCrLf & vbCrLf & "   {0}", _
            Environment.OSVersion.ToString( ) )
    End Sub
End Module 

' This example of the OperatingSystem constructor and
' OperatingSystem.ToString( ) generates the following output.
' 
' Create and display several different OperatingSystem objects:
' 
'    Microsoft Windows NT 0.0
'    Microsoft Win32S 3.11
'    Microsoft Windows 98 5.25.625
'    Microsoft Windows CE 5.6.7.8
'    Microsoft Windows NT 3.5.8.13
' 
' The OS version of the host computer is:
' 
'    Microsoft Windows NT 5.1.2600.0
// Example for the OperatingSystem constructor and the 
// OperatingSystem.ToString( ) method.
using System;

class OpSysConstructDemo 
{
    // Create and display an OperatingSystem object.
    static void BuildOSObj( PlatformID pID,
 Version ver )
    {
        OperatingSystem os = new OperatingSystem( pID, ver );

        Console.WriteLine( "   {0}", os.ToString( ) );
    }

    static void BuildOperatingSystemObjects(
 )
    {
        // The Version object does not need to correspond to an 
        // actual OS version.
        Version verNull     = new Version( );
        Version verMajMin   = new Version( 3, 11 );
        Version verMMBld    = new Version( 5, 25, 625 );
        Version verMMBVer   = new Version( 5, 6, 7, 8 );
        Version verString   = new Version( "3.5.8.13"
 );

        // All PlatformID members are shown here.
        BuildOSObj( PlatformID.Win32NT, verNull );
        BuildOSObj( PlatformID.Win32S, verMajMin );
        BuildOSObj( PlatformID.Win32Windows, verMMBld );
        BuildOSObj( PlatformID.WinCE, verMMBVer );
        BuildOSObj( PlatformID.Win32NT, verString );
    }

    public static void Main(
 ) 
    {
        Console.WriteLine( 
            "This example of the OperatingSystem constructor " +
            "and \nOperatingSystem.ToString( ) " +
            "generates the following output.\n" );
        Console.WriteLine( 
            "Create and display several different " +
            "OperatingSystem objects:\n" );

        BuildOperatingSystemObjects( );

        Console.WriteLine( 
            "\nThe OS version of the host computer is:\n\n   {0}", 
            Environment.OSVersion.ToString( ) );
    }
}

/*
This example of the OperatingSystem constructor and
OperatingSystem.ToString( ) generates the following output.

Create and display several different OperatingSystem objects:

   Microsoft Windows NT 0.0
   Microsoft Win32S 3.11
   Microsoft Windows 98 5.25.625
   Microsoft Windows CE 5.6.7.8
   Microsoft Windows NT 3.5.8.13

The OS version of the host computer is:

   Microsoft Windows NT 5.1.2600.0
*/
// Example for the OperatingSystem constructor and the 
// OperatingSystem::ToString( ) method.
using namespace System;

// Create and display an OperatingSystem object.
void BuildOSObj( PlatformID pID, Version^ ver )
{
   OperatingSystem^ os = gcnew OperatingSystem( pID,ver );
   Console::WriteLine( "   {0}", os->ToString() );
}

void BuildOperatingSystemObjects()
{
   
   // The Version object does not need to correspond to an 
   // actual OS version.
   Version^ verNull = gcnew Version;
   Version^ verMajMin = gcnew Version( 3,11 );
   Version^ verMMBld = gcnew Version( 5,25,625 );
   Version^ verMMBVer = gcnew Version( 5,6,7,8 );
   Version^ verString = gcnew Version( "3.5.8.13" );
   
   // All PlatformID members are shown here.
   BuildOSObj( PlatformID::Win32NT, verNull );
   BuildOSObj( PlatformID::Win32S, verMajMin );
   BuildOSObj( PlatformID::Win32Windows, verMMBld );
   BuildOSObj( PlatformID::WinCE, verMMBVer );
   BuildOSObj( PlatformID::Win32NT, verString );
}

int main()
{
   Console::WriteLine( "This example of the OperatingSystem constructor and
 \n"
   "OperatingSystem::ToString( ) generates the following "
   "output.\n" );
   Console::WriteLine( "Create and display several different "
   "OperatingSystem objects:\n" );
   BuildOperatingSystemObjects();
   Console::WriteLine( "\nThe OS version of the host computer is:\n\n   {0}",
 Environment::OSVersion->ToString() );
}

/*
This example of the OperatingSystem constructor and
OperatingSystem::ToString( ) generates the following output.

Create and display several different OperatingSystem objects:

   Microsoft Windows NT 0.0
   Microsoft Win32S 3.11
   Microsoft Windows 98 5.25.625
   Microsoft Windows CE 5.6.7.8
   Microsoft Windows NT 3.5.8.13

The OS version of the host computer is:

   Microsoft Windows NT 5.1.2600.0
*/
// Example for the OperatingSystem constructor and the 
// OperatingSystem.ToString( ) method.
import System.*;

class OpSysConstructDemo
{
    // Create and display an OperatingSystem object.
    static void BuildOSObj(PlatformID pID,
 Version ver)
    {
        OperatingSystem os = new OperatingSystem(pID, ver);
        Console.WriteLine("   {0}", os.ToString());
    } //BuildOSObj

    static void BuildOperatingSystemObjects()
    {
        // The Version object does not need to correspond to an 
        // actual OS version.
        Version verNull = new Version();
        Version verMajMin = new Version(3, 11);
        Version verMMBld = new Version(5, 25, 625);
        Version verMMBVer = new Version(5, 6, 7, 8);
        Version verString = new Version("3.5.8.13");

        // All PlatformID members are shown here.
        BuildOSObj(PlatformID.Win32NT, verNull);
        BuildOSObj(PlatformID.Win32S, verMajMin);
        BuildOSObj(PlatformID.Win32Windows, verMMBld);
        BuildOSObj(PlatformID.WinCE, verMMBVer);
        BuildOSObj(PlatformID.Win32NT, verString);
    } //BuildOperatingSystemObjects

    public static void main(String[]
 args)
    {
        Console.WriteLine(("This example of the OperatingSystem constructor
 " 
            + "and \nOperatingSystem.ToString( ) " 
            + "generates the following output.\n"));
        Console.WriteLine(("Create and display several different " 
            + "OperatingSystem objects:\n"));
        BuildOperatingSystemObjects();
        Console.WriteLine(
            "\nThe OS version of the host computer is:\n\n   {0}",
            Environment.get_OSVersion().ToString());
    } //main
} //OpSysConstructDemo

/*
This example of the OperatingSystem constructor and
OperatingSystem.ToString( ) generates the following output.

Create and display several different OperatingSystem objects:

   Microsoft Windows NT 0.0
   Microsoft Win32S 3.11
   Microsoft Windows 98 5.25.625
   Microsoft Windows CE 5.6.7.8
   Microsoft Windows NT 3.5.8.13

The OS version of the host computer is:

   Microsoft Windows NT 5.1.2600.0
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
OperatingSystem クラス
OperatingSystem メンバ
System 名前空間

OperatingSystem プロパティ


OperatingSystem メソッド


OperatingSystem メンバ

バージョンプラットフォーム ID など、オペレーティング システムについての情報表します。このクラス継承できません。

OperatingSystem データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
参照参照

関連項目

OperatingSystem クラス
System 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からOperating_systemを検索した結果を表示しています。
Weblioに収録されているすべての辞書からOperating_systemを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からOperating_system を検索

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

辞書ショートカット

すべての辞書の索引

「Operating_system」の関連用語

1
オー‐エス デジタル大辞泉
100% |||||

2
100% |||||

3
ドス デジタル大辞泉
100% |||||





8
MSDOS デジタル大辞泉
96% |||||

9
エム‐オー‐エス デジタル大辞泉
96% |||||


Operating_systemのお隣キーワード
検索ランキング

   

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



Operating_systemのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS