Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public T Read<T>(string comment)
- {
- T value = default(T);
- Type s = typeof(T);
- MethodInfo i = this.r.GetType().GetMethod("Read"+s.Name);
- if(i != null)
- { value = (T)i.Invoke(this.r, new object[] { });
- }
- if (comment != null)
- {
- AddString(value, comment);
- }
- else
- {
- Console.WriteLine("Comment cannot be empty!!");
- }
- return value;
- }
Add Comment
Please, Sign In to add comment