V
V
Vlad2016-06-09 19:25:24
Java
Vlad, 2016-06-09 19:25:24

How to replace java wildcard in c#?

Rewriting code from java to .net c# ran into a problem with transferring classes from wildcard. There are two classes

public abstract class Client<T extends Connection<?>>
public class Connection<T extends Client<?>>

I thought it could be done like this
public abstract class Client<T> where Connection<U>

but it turns out that it doesn't even work.
public abstract class Client<T, U> where Connection<T, U>
public abstract class Connection<T, U> where Client<T, U>

so how do you get out of the situation? And do I need to bathe;) thank you all

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question