<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FRollResult%2FRollRoot</id>
	<title>Dice/RollResult/RollRoot - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FRollResult%2FRollRoot"/>
	<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/RollResult/RollRoot&amp;action=history"/>
	<updated>2026-05-03T06:57:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://skizzerz.net/DiceRoller/index.php?title=Dice/RollResult/RollRoot&amp;diff=189&amp;oldid=prev</id>
		<title>Skizzerz: Created page with &quot;{{APIdoc|RollResult.RollRoot Property}} Gets the root of the dice expression's abstract syntax tree.  {{ns}}  == Syntax == &lt;syntaxhighlight lang=&quot;C#&quot;&gt; public DiceAST RollRoot...&quot;</title>
		<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/RollResult/RollRoot&amp;diff=189&amp;oldid=prev"/>
		<updated>2017-04-10T22:19:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{APIdoc|RollResult.RollRoot Property}} Gets the root of the dice expression&amp;#039;s abstract syntax tree.  {{ns}}  == Syntax == &amp;lt;syntaxhighlight lang=&amp;quot;C#&amp;quot;&amp;gt; public DiceAST RollRoot...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{APIdoc|RollResult.RollRoot Property}}&lt;br /&gt;
Gets the root of the dice expression's abstract syntax tree.&lt;br /&gt;
&lt;br /&gt;
{{ns}}&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C#&amp;quot;&amp;gt;&lt;br /&gt;
public DiceAST RollRoot { get; private set; }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Property Value ===&lt;br /&gt;
Type: [[Dice/AST/DiceAST|Dice.AST.DiceAST]]&lt;br /&gt;
&lt;br /&gt;
The root of the AST for this roll. Accessing this is usually not required, but is exposed if deeper introspection into the roll is desired. This property is read-only.&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
All nodes in the AST inherit from DiceAST. However, in order to gain access to child nodes these nodes must be cast into their appropriate node type. See the [[Dice/AST|Dice.AST]] namespace reference for more information on all valid node types.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example inspects the value of the d8 from the dice expression {{c|(1d8)d6}} by using RollRoot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C#&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using Dice;&lt;br /&gt;
using Dice.AST;&lt;br /&gt;
&lt;br /&gt;
class Sample&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        RollResult result = Roller.Roll(&amp;quot;(1d8)d6&amp;quot;);&lt;br /&gt;
        DiceAST d8 = ((RollNode)result.RollRoot).NumDice;&lt;br /&gt;
        Console.WriteLine(d8.Value); // outputs the value of the d8&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Skizzerz</name></author>
		
	</entry>
</feed>