c#中一个脚本调用另一个脚本的函数

除了public static外还用什么方法,可以的话,举一个简单的例子

不同的命名空间要先using
比如一个程序,这么写的
namespace WindowsFormApplication1
{
public class Form1 : Form
{
...
}
}
它要调用
namespace Library1
{
class Class1
{
public void 方法()
{
...
}
}
}
里面的函数,就需要带上命名空间:
在第一个代码头上加上
using Library1;

另一个就是static的函数用 类名.函数名
否则需要先实例化
Class1 c = new Class1();
c.方法();

除此之外也可以用委托

啥意思?一个类中调用另一个类中的函数(方法)?直接实例化那个类然后调用就是了(new Class().Method()).

C#我不是很清楚,C++中 如果要使用另一个.cpp中的类可以使其包含#include “另一个.cpp的头文件.h",而在C#中如何实现这一效果,我是C#初学者,可能说的不是很清楚。

去接用对象,或用 static 函数的方法都可以

A field initializer cannot reference the nonstatic field, method, or property `csmouspo.n报这样的错误,什么地方写错了还是??

public class csmouspo : MonoBehaviour {
cs cs1=new cs();

    int i=n.cshs();

}

public class cs : MonoBehaviour {

    public int cshs()
    {
            return 1;
    }

}

你不要用C++来理解C#,根本不是一个东西。比如说,C#允许你在两个源代码文件中定义一个类。
在第一个文件里面写
partial class A
{
int i;
}
在第二个文件里面写
partial class A
{
int j;
}
最终编译出来的只有一个类:
class A
{
int i;
int j;
}
那么我问你,你说i和j谁在前?这个根本不好说。