How to change the GameObject's Inspector Icon at C# script?

I want use C # script to change the GameObject’s inspector icon.

Use in the Editor, not Runtime.

As shown below:

49258-inspectoricon.png

Duplicate. See my answer here Programmatically assign a Label Icon to a Game Object - Unity Answers