Exemple #1
0
        /// <summary>
        /// Returns the length of the node value.
        /// </summary>
        /// <param name="node1">The first value</param>
        /// <param name="node2">The second value</param>
        /// <returns>The sum of the length of the nodes value.</returns>
        public static IntBoxElement Lenght(StringBoxElement par)
        {
            IntBoxElement element = new IntBoxElement(null, "IntBox", "IntBox");

            element.Value = par.Value.Length;
            return(element);
        }
Exemple #2
0
 /// <summary>
 /// Determines whether the node1 value is lexicographically greater than node2 value.
 /// </summary>
 /// <param name="node1">The first value</param>
 /// <param name="node2">The second value</param>
 /// <returns>True if the node1 value is lexicographically greater than node2 value, false otherwise</returns>
 public static bool Greater(StringBoxElement node1, StringBoxElement node2)
 {
     if (String.Compare(node1.Value, node2.Value) > 0)
     {
         return(true);
     }
     return(false);
 }
Exemple #3
0
 /// <summary>
 /// Determines whether the node1 value and node2 value have the same value.
 /// </summary>
 /// <param name="node1">The first value</param>
 /// <param name="node2">The secondo value</param>
 /// <returns>True if node1 value is equal than node2 value, false otherwise</returns>
 public static bool Equal(StringBoxElement node1, StringBoxElement node2)
 {
     return(node1.Value == node2.Value);
 }