Results 1 to 3 of 3

Thread: how fix Object reference not set to an instance of an object. c#

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    50

    how fix Object reference not set to an instance of an object. c#

    hello
    how fix Object reference not set to an instance of an object. c#
    Code:
      ByPH.ReadProcessMem((ulong)address, out numArray, numArray.Length, out num);
    Name:  Screenshot 2023-03-10 003151.jpg
Views: 77
Size:  16.6 KB

  2. #2
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,138

    Re: how fix Object reference not set to an instance of an object. c#

    Step 1: Post in the C# section of the site.

    I've asked the mods to move this thread there, so please don't create another thread there, which will make even more work for the mods.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: how fix Object reference not set to an instance of an object. c#

    NullReferenceExceptions are generally very easy to diagnose because you do the same thing every time. When the exception is thrown, you simply check each reference used on that line to see which is null that shouldn't be. It's pretty much always going to be something before a dot so, in this case, ByPH or numArray. I'm going to guess the latter, given that that array is apparently supposed to be being passed out of the method. How to then fix it depends on the specifics of the situation, but you'd need to actually explain those specifics if you'd like our help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width