我的手机在设置中型号就显示android什么意思
在网上买的手机 HTC的 在手机设置关于手机 型号就显示android 插在豌豆荚也显示这个 手机后面也没显示 手机串号是352811041648514我不明白我的手机是什么型号了 懂得帮我查下 谢谢
最满意答案
出于接口实现或虚方法覆盖的目的,C#不支持返回类型协方差 。 详情请看这个问题:
C#支持从C#4开始的类型参数的引用类型构造的接口和委托类型的泛型协变和逆变 。
当将返回引用类型的方法转换为返回类型为兼容引用类型的委托类型时,C#支持返回类型协方差 。 (同样它支持参数类型的变换 。)
如果这个主题引起您的兴趣,我已经写了很多文章来讨论C#不支持的各种版本差异。 看到
https://blogs.msdn.microsoft.com/ericlippert/tag/covariance-and-contravariance/
了解详情。
C# does not support return type covariance for the purposes of interface implementation or virtual method overrding. See this question for details:
Does C# support return type covariance?
C# does support generic covariance and contravariance of interfaces and delegate types that are constructed wtih reference types for the type arguments as of C# 4.
And C# does support return type covariance when converting a method that returns a reference type to a delegate type whose return type is a compatible reference type. (And similarly it supports parameter type contravariance.)
If this subject interests you, I have written a great many articles discussing various versions of variance that C# does and does not support. See
https://blogs.msdn.microsoft.com/ericlippert/tag/covariance-and-contravariance/
for details.
相关问答
更多-
出于接口实现或虚方法覆盖的目的,C#不支持返回类型协方差 。 详情请看这个问题: C#支持返回类型协方差吗? C#支持从C#4开始的类型参数的引用类型构造的接口和委托类型的泛型协变和逆变 。 当将返回引用类型的方法转换为返回类型为兼容引用类型的委托类型时,C#支持返回类型协方差 。 (同样它支持参数类型的变换 。) 如果这个主题引起您的兴趣,我已经写了很多文章来讨论C#不支持的各种版本差异。 看到 https://blogs.msdn.microsoft.com/ericlippert/tag/covari ...
-
如果只有一个实现,我需要一个接口吗?(Do I need an interface if there is just one implementation? [duplicate])[2023-06-23]
当您谈论设计模式和最佳编码实践时, 需要的不是您应该问自己的问题。 你不需要你做的大部分工作,至少不是立即做的。 当然,在实际操作之前,您不知道是否需要不同的合同实现。 所以这不是你现在需要什么的问题。 这是你希望以后会有什么问题。 你在发布的链接中看到的是SOLID中的D : 依赖倒置原则 : 取决于抽象,而不是实现。 你知道,你比对不起更安全。 编辑:另外,我建议不要接口(或前缀)的sufixes。 如果您将使用接口而不是实现,请将接口名称清除。 在您的情况下,通常的选择是接口的UserServiceI ... -
什么是接口?(What's interface for? [duplicate])[2023-07-01]
来自MSDN : 接口仅包含方法 , 委托或事件的签名。 方法的实现是在实现接口的类中完成的, From MSDN: An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that implements the interface, -
为什么可以在基类中实现接口方法?(Why is it possible to implement an interface method in base class? [duplicate])[2023-10-07]
对于接口中的每个成员,编译器只需要查找一个显式实现(如果有的话),然后查找一个公共实现( 隐式实现),即在公共API上匹配接口签名的方法。 在这种情况下, A.FooMethod()看起来像一个公共实现的精细匹配。 如果B对该选择不满意,可以使用new的方法,或者使用明确的实现; 后者将是首选: void IFoo.FooMethod() { /* explicit implementation */ } For each member in the interface, the compiler sim ... -
implements意味着实现,当interface意图声明只提供interface不用于实现。 一个100%的abstract class在功能上等同于一个interface但是如果你希望(在这种情况下它不会保持100% abstract ),它也可以实现,所以从JVM的角度来看,它们是不同的。 100%抽象类中的成员变量也可以有任何访问限定符,在这个接口中,它们是隐式的public static final 。 implements means implementation, when interfac ...
-
如何实现一个实现另一个接口的通用接口?(How to implement a generic interface which implements another interface?)[2023-04-04]
这有什么问题: public interface ITransaction { } public interface IVolatileTransaction: ITransaction where T : ITransaction { } What's wrong with this: public interface ITransaction { } public interface IVolatileTransaction : ITransaction where T : I ... -
是。 您可以。 public abstract class BaseUser : IUser { } public class User : BaseUser { } public class AdminUser : BaseUser { } Yes. You can. public abstract class BaseUser : IUser { } public class User : BaseUser { } public class AdminUser : BaseUse ...
-
如何实现接口过载(How to implement interface overload)[2023-07-06]
class Bar implements Fooable { Foo(n: number): string; Foo(n: string): string; Foo(n: any) { if(typeof n === 'number') { return n + ' is a number'; } else if(typeof n === 'string') { return n + ' is a s ... -
具体实现接口(Implement interface concretely)[2022-07-25]
据我了解你的问题(从评论交换),一些处理程序可以处理任何类型的T (或许多类型T ),而其他处理程序只能处理一种类型。 此外,您希望以多态方式在一个使用者中使用这些处理程序。 这是你可以做的事情: 像这样创建两个接口: public interface IHandler //Can handle many types { T Process(int process); bool CanProcess (); } public interface IHandler //Ca ... -
简答:你不能。 您可以做的是提供实现一个或另一个接口的视图。 例如: public class OnePossibleSolution { // no "implements" private String interface1Method() { return "whatever"; } public Interface1 asInterface1() { return new Interface1() { @Overri ...