摘要: 目录1. 什么是Mac Address?2. 如何查找MAC地址?3. 二层数据交换4. STP / RSTP / MSTP Protocol4.1 STP的作用4.2 STP 生成树算法的三个步骤4.3 STP缺点5. ARP Protocol6. MACSEC 1. 什么是Mac Address 阅读全文
posted @ 2024-06-11 09:38 文心1225 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 在 C 和 C++ 中,许多对象要求程序员声明他们后为其分配资源,然后才能安全地使用对象。使用完后,则需要程序员将这些资源释放到自由内存池。如果资源得不到释放,则认为代码泄露内存。然而,如果过早地释放,又可能发生数据丢失、Null指针等问题。 Java 和 C# 都有单独的管理应用程序管理对象的生存 阅读全文
posted @ 2024-06-10 21:39 文心1225 阅读(2) 评论(0) 推荐(0) 编辑
摘要: virtual 使用 c#的方法,默认为非虚方法,如果一个方法被声明为 virtual (虚方法),则继承该方法的任何类都可以实现它自己的版本。 public class BaseEngineer { public virtual void Work() { Console.WriteLine("B 阅读全文
posted @ 2024-06-09 20:43 文心1225 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1. Delegate 委托 在C#中,委托是一种引用类型,表示对具有特定参数列表和返回类型的方法的引用,即委托就是一种用来指向一个方法的类型变量,可以通过委托实例调用方法,关键字是 delegate。 // 声明一个委托 public delegate void MyDelegate(string 阅读全文
posted @ 2024-06-04 21:07 文心1225 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1. IEnumerable namespace System.Collections: public interface IEnumerable { public IEnumerator GetEnumerator (); } public interface IEnumerator { pubi 阅读全文
posted @ 2024-06-03 20:20 文心1225 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1. 隐式类型 c#允许使用 var 声明变量,编译期会通过初始化语句右侧的表达式推断出变量的类型。 // i is compiled as an int var i = 5; // s is compiled as a string var s = "Hello"; // a is compile 阅读全文
posted @ 2024-06-02 22:00 文心1225 阅读(7) 评论(0) 推荐(0) 编辑