Line 21: Char 19: error CS0176: Member 'Solution.UniqueMorseRepresentations(string[])' cannot be accessed with an instance reference; qualify it with a type name instead (in Driver.cs)
When compiling in Visual Studio, the error does not occur
'''
public class Solution {
public static int UniqueMorseRepresentations(string[] words)
{
string[,] dict = new string[26, 2] { { "a", ".-" },
{ "b", "-..." },
{ "c", "-.-." },
{ "d", "-.." },
{ "e", "." },
{ "f", "..-." },
{ "g", "--." },
{ "h", "...." },
{ "i", ".." },
{ "j", ".---" },
{ "k", "-.-" },
{ "l", ".-.." },
{ "m", "--" },
{ "n", "-." },
{ "o", "---" },
{ "p", ".--." },
{ "q", "--.-" },
{ "r", ".-." },
{ "s", "..." },
{ "t", "-" },
{ "u", "..-" },
{ "v", "...-" },
{ "w", ".--" },
{ "x", "-..-" },
{ "y", "-.--" },
{ "z", "--.."} };
string[] res = new string[100];
int counter = 0;
string temp;
bool found;
for (int lap = 0; lap < words.Length; lap++)
{
found = false;
temp = null;
for(int e = 0; e < words[lap].Length; e++)
for (int row = 0; row < 26; row++)
if (dict[row, 0][0] == words[lap][e])
{
//res[lap] += dict[row, 1];
temp += dict[row, 1];
break;
}
for (int i = 0; res[i] != null; i++)
if (res[i].Equals(temp))
{
found = true;
break;
}
if(!found)
res[counter++] = temp;
}
return counter;
}}
'''