how to change content offset of a style

i created a style named playStyle.

public GUIStyle playStyle;

But i cant able to change content offset of playStyle using code.

in void OnGUI() i given

playStyle.contentOffset.x = -40f;

Gets Error:
error CS1612: Cannot modify a value type return value of `UnityEngine.GUIStyle.contentOffset’. Consider storing the value in a temporary variable

How to give contentOffset?

The error message is telling you that you can’t modify the value, and to store it in a temporary variable. It means that you should do exactly that (like this):

Vector2 contentOffset = playStyle.contentOffset;
contentOffset.x = -40;
playStyle.contentOffset = contentOffset;

Isn’t C# fun?