Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for CS8714 add where T : notnull #250

Open
JohanLarsson opened this issue Oct 29, 2019 · 1 comment
Open

Fix for CS8714 add where T : notnull #250

JohanLarsson opened this issue Oct 29, 2019 · 1 comment

Comments

@JohanLarsson
Copy link
Member

    public static class PooledDictionary
    {
        /// <summary>
        /// Borrow a dictionary, dispose returns it.
        /// </summary>
        /// <typeparam name="TKey">The type of keys.</typeparam>
        /// <typeparam name="TValue">The type of values.</typeparam>
        /// <returns>A <see cref="PooledDictionary{TKey,TValue}"/>.</returns>
        public static PooledDictionary<TKey, TValue> Borrow<TKey, TValue>() => PooledDictionary<TKey, TValue>.Borrow();
    }
@JohanLarsson
Copy link
Member Author

image

namespace N
{
    using System.Collections.Generic;

    public class C<TKey, TValue>
    {
        private readonly Dictionary<TKey, TValue> map = new Dictionary<TKey, TValue>();
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant