c# - Extension method must be defined in a non-generic static class

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat
Status
Not open for further replies.

turkey

Newbie
Feb 5, 2017
3
12
0
Have a this error

The code delete to fix and I need a this code..

public static Vector3 ClampAngle(this Vector3 src)
{
if (src.Y > 180.0f)
{
src.Y = 180.0f;
}
if (src.Y < -180.0f)
{
src.Y = -180.0f;
}
if (src.X > 89.0f)
{
src.X = 89.0f;
}
if (src.X > -89.0f)
{
src.X = -89.0f;
}
src.Z = 0f;
return src;
}
 

Boboo99

Scrub
Dank Tier VIP
Fleep Tier Donator
Feb 20, 2016
470
12,178
44
C#:
public class Idiot
{
	public string Name;
	public Idiot(string _name)
	{
		Name = _name;
	}
}

public static class ExtensionsToIdiotClass
{
	public static MakeTopic(this Idiot i)
	{
		System.Windows.Forms.Messagebox.Show(i.Name + " can't read!");
	}
}
 
Status
Not open for further replies.
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods