用模板类
public class MDB<T> { public static string dbname =""; } public class umdb : MDB<umdb>{}
原文连接:https://social.msdn.microsoft.com/Forums/zh-CN/c79fe49e-d2a3-4085-9ed4-ff6090c45148/c-387452457721464373273248725215303403838239064?forum=visualcshartzhchs