Is the class defined in C# already? If yes, use the below code to call the function -
Record r= new Record();
r.getMessage();
To define class, if it not defined in C# yet, use below -
Class Record
{
public function getMessage()
{
return "Hello world";
}
}