ApiCore.XmlUtils.Int C# (CSharp) Метод

Int() публичный статический Метод

Gets the int value from node
public static Int ( string nodeName ) : int
nodeName string node
Результат int
        public static int Int(string nodeName)
        {
            if (XmlUtils.node.SelectSingleNode(nodeName) != null)
            {
                return Convert.ToInt32(XmlUtils.node.SelectSingleNode(nodeName).InnerText);
            }
            return -1;
        }

Usage Example

Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 public static CommentsInfo GetCommentsInfo(XmlNode node)
 {
     if (node != null)
     {
         XmlUtils.UseNode(node);
         CommentsInfo c = new CommentsInfo();
         c.Count      = XmlUtils.Int("count");
         c.CanComment = XmlUtils.Bool("can_post");
         return(c);
     }
     return(null);
 }
All Usage Examples Of ApiCore.XmlUtils::Int