⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myclass.cs

📁 .NET 2.0模式开发实战源代码,使用C#说明
💻 CS
字号:
using System;using System.Collections;namespace DbgMgr {    public class DebugMgr {        private static Stack _stack = new Stack();        private static int _debugLevel = 0;        public static void assignDebugFlags( int debugLevel) {            _debugLevel = debugLevel;        }        public static void start( int debugLevel, string buffer) {            if( debugLevel <= _debugLevel) {                output( debugLevel, "**** start (" + buffer + ") ****");                _stack.Push( buffer);            }        }        public static void end( int debugLevel) {            if( debugLevel <= _debugLevel) {                string identifier = (string)_stack.Pop();                output( debugLevel, "**** end (" + identifier + ") ****");            }        }        public static void output( int debugLevel, string buffer) {            if( debugLevel <= _debugLevel) {                int counter = 0;                while( counter < _stack.Count) {                    Console.Write( "    ");                    counter += 1;                }                Console.Write( buffer);                Console.Write( "\n");            }        }        public static void outputVar( int debugLevel, string identifier, object buffer) {            if( debugLevel <= _debugLevel) {                int counter = 0;                while( counter < _stack.Count) {                    Console.Write( "    ");                    counter += 1;                }                Console.Write( identifier);                Console.Write( "(");                Console.Write( buffer);                Console.Write( ")\n");            }        }    }}// project created on 9/24/2004 at 8:23 PM

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -