From e93d28957c8c217e0b4956eb9767452234f23a93 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Sat, 9 Dec 2017 13:20:11 -0800 Subject: [PATCH] Add convenience ctors to Div --- Ooui/Div.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Ooui/Div.cs b/Ooui/Div.cs index 02012c5..d4d8009 100644 --- a/Ooui/Div.cs +++ b/Ooui/Div.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace Ooui { @@ -8,5 +9,21 @@ namespace Ooui : base ("div") { } + + public Div (params Element[] children) + : this () + { + foreach (var c in children) { + AppendChild (c); + } + } + + public Div (IEnumerable children) + : this () + { + foreach (var c in children) { + AppendChild (c); + } + } } }