Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:10:42+00:00 2026-06-15T13:10:42+00:00

I have the following struct; static Memory memory; public struct Memory { public string

  • 0

I have the following struct;

static Memory memory;

  public struct Memory
  {
      public string Name;
      public string Manufacturer;
      public string MemoryType ;
      public string Speed;
      public string DeviceLocator;
      public string Capacity;
      public string OtherInfo;
  };

I can obtain everything but the following:

    ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMemory");
         ManagementObjectCollection myobject = searcher.Get();
             foreach (ManagementObject item in myobject)
             {
                memory.OtherInfo = item["OtherIdentifyingInfo"].ToString();
             }

When i try to do the above, i get:

Object reference not set to an instance of an object.

Do i have to somehow create an instance of item["OtherIdentifyingInfo"]?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:10:43+00:00Added an answer on June 15, 2026 at 1:10 pm

    OtherIdentifyingInfo

    Data type: string
    Access type: Read-only
    Additional data, beyond asset tag information, that can be used to identify a physical element. One example is bar code data associated with an element that also has an asset tag. If only bar code data is available and unique or able to be used as an element key, this property is be NULL and the bar code data is used as the class key in the tag property. This property is inherited from CIM_PhysicalElement.

    You need to Check if the value is Null before you pass to string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: #include <boost/shared_ptr.hpp> struct Foo { int a; }; static
I have the following struct private struct sData{ public int volume; public System.Timers.Timer aliveTimer;
Suppose I have the following: struct Person { std::string mName; Birthday mBirthday; }; using
Say, I have the following struct in C# : public struct MyStructCSharp { private
Say I have a struct declared like the following: public struct Test { public
I have the following structure: [StructLayout(LayoutKind.Sequential)] public struct TCurve { public int fNumItems; /*
Say I have the following class: template<class T> struct A { static int value;
I have the following structure: private struct S_indiv { public int[] x; public int
Let's say I have the following method: public static int CountNonNullMembers<T>(this IEnumerable<T> enumerable) {
I have some generic types, like the following: public struct Tuple<T1, T2> { ...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.