public static void AddClass(this XElement @this, string @class) { if (@this == null) throw new ArgumentNullException(); var c = @this.ClassAttribute(); if (c == null) { @this.Add(c = new XClassAttribute()); } c.Add(@class); }
public static void AddClass(this XElement @this, string @class) { if (@this == null) { throw new ArgumentNullException(); } var c = @this.ClassAttribute(); if (c == null) { @this.Add(c = new XClassAttribute()); } c.Add(@class); }