c# - 这段 C# 代码中的冒号是什么意思?

标签 c# inheritance

C#中的类或接口(interface)定义中的:表示什么。

public interface IServer : IServerManager, ISimulation, ISiteEx
{
    /// <summary>
    /// Returns the highest game version that supported by this server.
    /// Higher versions aren't guaranteed to work perfect.
    /// </summary>
    Version MaxSupportedGameVersion { get; }

    /// <summary>
    /// Gets/sets the current server configuration.
    /// </summary>
    ServerConfiguration Configuration { get; set; }
}

最佳答案

:用于表示算子左边的接口(interface)正在实现(从技术上讲,实现接口(interface)的类会给出实现)右边的接口(interface)。

: 以相同的方式用于指示类何时也正在实现一个或多个接口(interface)。

关于c# - 这段 C# 代码中的冒号是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7656522/

相关文章:

java - 为什么我需要提供封闭类对象而不是封闭类对象

css - <a> 标签何时不继承父标签的颜色属性?

c# - 查询表达式 ""中的语法错误(缺少运算符)

c# - 将 DateTime 条目列表转换为自定义摘要列表

c# - 在 WPF 中理解和创建事件时遇到问题

node.js - NodeJs 给我一个对象 #<Object> 没有方法

c# - 通过 AudioVideoCaptureDevice 创建缩略图

c# - 检查 EditText 的字符数

java - 在抽象父类(super class)上找不到继承的注释

C# 使用 proto-buf 序列化继承的类,而不使用 ProtoInclude