/Ratings/AttributeContainer.cs
C# | 48 lines | 44 code | 4 blank | 0 comment | 0 complexity | abe36dbe4dcffc4ead8491b93bede6a8 MD5 | raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Xml.Linq;
- using System.Xml.XPath;
- using System.IO;
- namespace Ratings
- {
- class AttributeContainer
- {
- private String name;
- private object value = null;
- public AttributeContainer(String name, int value)
- {
- this.name = name;
- this.value = value;
- }
- public String Name
- {
- set
- {
- name = value;
- }
- get
- {
- return name;
- }
- }
-
- public int ValueAsInt()
- {
- int result;
- try
- {
- result = (int)value;
- }
- catch
- {
- result = 0;
- }
- return result;
- }
- }
- }