Answers for "how to import a function from a class in c#"

C#
1

how to import a function from a class in c#

namespace Phrases
{
  public class Greetings
  {
    public static void SayHello()
    {
      Console.WriteLine("Hello");
    }
  }
}

using static Phrases.Greetings;

namespace NamespaceName
{
  public class ClassName
  {
    void FuntionName()
    {
      SayHello();
    }
  }
}
Posted by: Guest on February-21-2021

Code answers related to "how to import a function from a class in c#"

C# Answers by Framework

Browse Popular Code Answers by Language