~ubuntu-branches/ubuntu/karmic/hipo/karmic

« back to all changes in this revision

Viewing changes to taglib-sharp/TagLib/Asf/ContentDescriptor.cs

  • Committer: Bazaar Package Importer
  • Author(s): Arthur Loiret
  • Date: 2007-09-30 21:51:29 UTC
  • mto: (2.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20070930215129-aphjk24c8h30r9d1
Tags: upstream-0.5
ImportĀ upstreamĀ versionĀ 0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
 
113
113
      public uint ToDWord ()
114
114
      {
115
 
         if (type == DataType.Unicode && sValue != null)
116
 
            try
117
 
            {
118
 
               return System.UInt32.Parse (sValue);
119
 
            }
120
 
            catch {}
 
115
         uint value;
 
116
         if (type == DataType.Unicode && sValue != null && uint.TryParse (sValue, out value))
 
117
            return value;
121
118
         
122
119
         return (uint) lValue;
123
120
      }
124
121
 
125
122
      public long ToQWord ()
126
123
      {
127
 
         if (type == DataType.Unicode && sValue != null)
128
 
            try
129
 
            {
130
 
               return System.Int64.Parse (sValue);
131
 
            }
132
 
            catch {}
 
124
         long value;
 
125
         if (type == DataType.Unicode && sValue != null && long.TryParse (sValue, out value))
 
126
            return value;
133
127
         
134
128
         return (long) lValue;
135
129
      }
136
130
 
137
131
      public short ToWord ()
138
132
      {
139
 
         if (type == DataType.Unicode && sValue != null)
140
 
            try
141
 
            {
142
 
               return System.Int16.Parse (sValue);
143
 
            }
144
 
            catch {}
 
133
         short value;
 
134
         if (type == DataType.Unicode && sValue != null && short.TryParse (sValue, out value))
 
135
            return value;
145
136
         
146
137
         return (short) lValue;
147
138
      }