-6

How to clear the object reference is required error? the script which i am using is coming up with the error that an object reference is required though i am trying to eliminating it by making it static but it isn't working out. can anyone please help me out? do anyswer quickly because i have to finish up this project and move on. the image shows my script which is having the error object reference is required. can anyone help me clear that error please?

  • Possible duplicate of [An object reference is required for the nonstatic field, method, or property on a Windows form](http://stackoverflow.com/questions/498400/an-object-reference-is-required-for-the-nonstatic-field-method-or-property-on) – Jim Nov 20 '16 at 14:37
  • 3
    *do anyswer quickly because i have to finish up this project and move on* == downvote and delete question as **quickly** as possible. – Jim Nov 20 '16 at 14:39
  • 1
    @Jim: I apologize it took so long to have me do the deed ;-) – zx485 Nov 20 '16 at 21:34
  • @zx485 ;) no worries – Jim Nov 20 '16 at 23:10

1 Answers1

-1

As indicated error message, UDPCom.sendLTDimples is non static function. So you will have to create a new object of class UDPCom and then using that object call the function.

UDPCom obj = new UDPCom();
Obj.sendLTDimples();
Pratik Gaikwad
  • 1,526
  • 2
  • 21
  • 44