ComputerInfo.TotalPhysicalMemory Property
In this article
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Important
This API is not CLS-compliant.
Gets the total amount of physical memory for the computer.
public:
property System::UInt64 TotalPhysicalMemory { System::UInt64 get(); };
[System.CLSCompliant(false)]
public ulong TotalPhysicalMemory { get; }
[<System.CLSCompliant(false)>]
member this.TotalPhysicalMemory : uint64
Public ReadOnly Property TotalPhysicalMemory As ULong
A ULong
containing the number of bytes of physical memory for the computer.
- Attributes
The application cannot obtain the memory status.
This example uses the My.Computer.Info.TotalPhysicalMemory
property to display the total amount of physical memory for the computer on which the code runs.
MsgBox("Computer's available physical memory: " &
My.Computer.Info.TotalPhysicalMemory)
Applies to
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: