Yes, they are called delegates and anonymous methods.
Delegate signatures must be predefined outside the method for the body to be assigned, so it is not exactly like a function. First you declare a delegate:
class MyClass { public delegate boolean Decider(string message); }
And then in MyClass.MyMethod you can say Decider IsAllLowerCase = /* method name or anonymous method */; and then use it with var result = IsAllLowerCase(s); .
The good news is that .NET already has delegate definitions for most signatures that you might need. System.Action has different signatures for methods that return nothing, and System.Func for those that do.
As shown elsewhere,
Action<int, string> a = (n, s) => { for(var i=0; i<n; i++) Console.WriteLine(s);};
Lets you call a( /* inputs */ ); as if it were a local variable. (stuff) => { code } is a "lambda expression" or an anonymous method, you can also just pass the method name (if the signature matches):
Action<string> a = Console.WriteLine;
If you want to return something, use Func :
Func<bool, string> f = (b) => { return b.ToString(); };
Lets you call var result = f(b); in the same way.
As a note, delegates are a fun part of C # /. NET, but usually the way to control access is to make another method inside your class and declare it private. If your problem is with names, then you may need refactoring. For example, you can group methods in another class declared inside your source class (nested classes are supported) or completely move them to another class.