I currently have a function that looks like this:
public void AnimateLayoutTransform(object ControlToAnimate)
{
}
I use this feature in many different projects, so I want it to be very reusable. So now I have it in a .cs file enclosed in a namespace and class:
namespace LayoutTransformAnimation
{
public class LayoutAnims
{
public void AnimateLayoutTransform(object ControlToAnimate)
{
}
}
}
The problem is that to use this single function in this project I need to do something like
new LayoutTransformAnimation.LayoutAnims().AnimateLayoutTransform(mygrid);
Which just seems like a lot of work to reuse one function. Is there a way to at least use a function without creating a new instance of the class? Just as we can Double.Parse()not create a new one double?