Question: I'm wondering what the best practice here is for styling an element based on its state.

I have some content that can take a while to load, whilst it's loading I want to show a loading spinner.

Is it better to apply a class of 'loading' to the element until it's loaded, then remove this class with JS. Using the 'loading' class to render the spinner.

Or is it better practice to disassociate the loading state from a class and use a data attribute, i.e. [data-status = "loading"]. Then applying my styles to the data attribute rather than the class.

Cheers.

Answer: 
`DrawLine` can be used on a Graphics object and also it returns void. So this:

```
g = DrawLine(p, sp, ep);

```

Should be something like:

```
g.DrawLine(p, sp, ep);

```
You are using the `DrawLine` method wrong. It draws a line on `Graphics` instance. You should use something like this:

```
g.DrawLine(p, sp, ep);

```