hi,
i have function stringconcat(a,b) in class1 with namespace s1 and want to call this function in class2.
i have written as given below and getting errors like
Error 1 Cannot declare a variable of static type 's1.class1'
Error 2 Cannot create an instance of the static class 's1.class1'
Can someone please tell me what is wrong in this code
In file1.cs
-------------
namespace s1
{
publis static class class1
{
public static string a="IN";
public static string b="DIA";
public static void stringconcat(a,b);
}
}
In File2.cs
----------------
namespace s1
{
publis static class class2
{
class1 class1=new class1();
class1.stringconcat(a,b);
}
}

Ashiwani SharmaRank #5,816 · 285 reputationPosted Aug 18, 2016, 9:02 PM EDT
Bhuvan PandeyRank #2,683 · 519 reputationPosted Aug 18, 2016, 8:36 PM EDT
Vinay SinghRank #604 · 4K reputationPosted Aug 18, 2016, 10:59 PM EDT