Repository: dotnet/runtime
File: src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.Generics.cs (C#)

Code before:
        public extern static void AddInt(MyList<V> l, int a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Add")]
        public extern static void AddString(MyList<V> l, string a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Add")]
        public extern static void AddStruct(MyList<V> l, Struct a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Clear")]
        public extern static void Clear(MyList<V> l);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Add")]
        public extern static void Add(MyList<V> l, V element);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "AddWithIgnore")]
        public extern static void AddWithIgnore<W>(MyList<V> l, V element, W ignore);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "CanCastToElementType")]
        public extern static bool CanCastToElementType<W>(MyList<V> l, W element);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "CreateMessage")]
        public extern static string CreateMessage(GenericBase<V> b, V v);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "SetType")]
        public extern static void SetType(ref GenericStruct<V> s, Type type);
        
        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "SetType")]
        public extern static void SetType<U>(ref GenericStruct<V> s);

        [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "ElementType")]
        public extern static Type ElementType(MyList<V> l);

        [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "CanUseElementType")]
        public extern static bool CanUseElementType<W>(MyList<V> l, W element);

        [UnsafeAccessor(UnsafeAccessorKind.Field, Name=MyList<object>.GenericFieldName)]
        public extern static ref List<V> GetPrivateField(MyList<V> a);

        [UnsafeAccessor(UnsafeAccessorKind.Field, Name=MyList<int>.GenericEnumFieldName)]
        public extern static ref ClassWithEnum<V>.Enum GetPrivateEnumField(MyList<V> d);

        [UnsafeAccessor(UnsafeAccessorKind.StaticField, Name=MyList<int>.StaticGenericFieldName)]
        public extern static ref V GetPrivateStaticField(MyList<V> d);
    }

    static class Accessors
    {
        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "SetType")]
        public extern static void SetType<U>(ref Struct s);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "SetType")]

Review comment (suggestion):
This line contains trailing whitespace. According to the coding guidelines, there should be no trailing whitespace at the end of any line.
```suggestion

```

Code after:
    static class Accessors<V>
    {
        [UnsafeAccessor(UnsafeAccessorKind.Constructor)]
        public extern static MyList<V> Create(int a);

        [UnsafeAccessor(UnsafeAccessorKind.Constructor)]
        public extern static MyList<V> CreateWithList(List<V> a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = ".ctor")]
        public extern static void CallCtorAsMethod(MyList<V> l, List<V> a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Add")]
        public extern static void AddInt(MyList<V> l, int a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Add")]
        public extern static void AddString(MyList<V> l, string a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Add")]
        public extern static void AddStruct(MyList<V> l, Struct a);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Clear")]
        public extern static void Clear(MyList<V> l);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "Add")]
        public extern static void Add(MyList<V> l, V element);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "AddWithIgnore")]
        public extern static void AddWithIgnore<W>(MyList<V> l, V element, W ignore);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "CanCastToElementType")]
        public extern static bool CanCastToElementType<W>(MyList<V> l, W element);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "CreateMessage")]
        public extern static string CreateMessage(GenericBase<V> b, V v);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "SetType")]
        public extern static void SetType(ref GenericStruct<V> s, Type type);

        [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "SetType")]
        public extern static void SetType<U>(ref GenericStruct<V> s);

        [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "ElementType")]
        public extern static Type ElementType(MyList<V> l);

        [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "CanUseElementType")]
        public extern static bool CanUseElementType<W>(MyList<V> l, W element);

        [UnsafeAccessor(UnsafeAccessorKind.Field, Name=MyList<object>.GenericFieldName)]
        public extern static ref List<V> GetPrivateField(MyList<V> a);

        [UnsafeAccessor(UnsafeAccessorKind.Field, Name=MyList<int>.GenericEnumFieldName)]