ASP.NET中的静态C#类变量是什么?

ahm*_*md0 3 c# asp.net static static-members

我知道静态类变量在C++类中做了什么,我不太清楚的是用于ASP.NET Web应用程序的C#类中的静态类变量的生命周期.这是一个代码示例:

namespace MyWebApp
{
    public static class MyFunctions
    {
        private static string _cachedID;

        public static string getID(string strValue)
        {
            if(_cachedID == null)
                _cachedID = strValue;

            return _cachedID;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

有人可以用简单的英语为我解释一下吗?

ada*_*ost 5

我在某处读过.

静态变量/场开始存在静态的执行之前构造为包含它的类型,并且停止当相关联的应用程序域不再存在存在.