locked
Difference between where T : x, y and where T : x where T : y RRS feed

  • Question

  • User-1534620960 posted

    Here is a piece of code that I want to understand their difference. Its Generics.

    static T ProduceA<T>() where T : IEnumerable, IComparable
    {
    ....
    ....
    } 
    
    static T ProduceA<T>() where T : IEnumerable where T : IComparable
    {
    ...
    ...
    }

    What is the difference the above two codes? Do they mean the same thing?

    Thanks!

    Wednesday, August 6, 2014 8:35 AM

Answers

  • User197322208 posted

    same

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 6, 2014 8:46 AM

All replies