-2

So im A Roblox Exploiter That Is Making an Exploit But When I tried to Start Debugging its giving me this error code CS0118

using rtexecute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Retro;
namespace Retro
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Retro());
        }
    }
}

And Get Error Retro Is a Namespace but used as a type plz helpim new plz plz plz plz

Loathing
  • 5,109
  • 3
  • 24
  • 35
  • It happens when class name is same as namespace. Since Retro is the namespace, Can you try to rename Retro class name to something else.. – Ayaz Oct 18 '20 at 12:11
  • You get this error because you've used the name `Retro` as the namespace in your program in the line `namespace Retro`. You can change that. Or if you'd like to keep it, you can change `Application.Run(new Retro());` to `Application.Run(new Retro.Retro());` – Hans Kilian Oct 18 '20 at 12:13
  • Add then replace new Retro() instance with new class name.. Let's say new class name is Retro2 then replace it with new Retro2() – Ayaz Oct 18 '20 at 12:14
  • Remove that `using Retro;` and rename you starting Form to something like `RetroMain`, `RetroForm`, `frmRetro`, `MainForm` or whatever. It's not really a good idea to have a Form named as the namespace it belongs to, it creates a long series of problems internally. – Jimi Oct 18 '20 at 14:15
  • There's no `Retro` type in the code you posted. Only a namespace. And you use the namespace name `Retro` in a place where a type is expected (i.e. `new Retro()`). So, the error message is clear enough given the context. For a more detailed discussion of dealing with ambiguity when the code (unlikely what you've posted here) actually has both a namespace and a type with the same name, see duplicate. – Peter Duniho Oct 18 '20 at 23:49

1 Answers1

0

Try using static

using static Retro.Retro;

or

using Retro = Retro.Retro;

You can change the naming of Retro before the equal sign by any name.

UchiTesting
  • 111
  • 8