Question: I have a private field in a class that is not assigned anywhere explicitly, its value is actually set using reflections and an attribute that goes on the field. Now, Rider, the IDE I use, warns that the field is never assigned. This warning is what I would like to be disabled when the attribute is used. Like what happens with the SerializeField attribute.

I have searched a lot on how to do this, but the problem is that I have no idea where to start or what to search for, so I basically got nowhere. The best lead I got was that I would need to do something related to code analyzers, but I couldn't find out what exactly I need to do to suppress a warning in these conditions.

[Warning that I want to disable](https://i.stack.imgur.com/o8no2.png)

[How I would like it to be](https://i.stack.imgur.com/2OKJm.png)

Answer: 
You should be able to stop the warning by adding the [MeansImplicitUseAttribute](https://www.jetbrains.com/help/resharper/Reference__Code_Annotation_Attributes.html#MeansImplicitUseAttribute) to your GetComponentAttribute class.

```
using System;
using JetBrains.Annotations;

[MeansImplicitUse(ImplicitUseKindFlags.Assign)]
public class GetComponentAttribute : Attribute
{

}

```
Rider has `[UsedImplicitly]` attribute for this.