Skip to Main Content
C# in a Nutshell, Second Edition
book

C# in a Nutshell, Second Edition

by Peter Drayton, Ben Albahari, Ted Neward
August 2003
Intermediate to advanced content levelIntermediate to advanced
928 pages
32h 1m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell, Second Edition

Name

FormatterConverter

Synopsis

This class is a basic implementation of the IFormatterConverter interface. It provides a formatter with a means to convert values to different base types. The generic Convert( ) method converts a value into a specified type. The various To* methods convert values into specific types.

public class FormatterConverter : IFormatterConverter {
// Public Constructors
   public FormatterConverter( );
// Public Instance Methods
   public object Convert(object value, Type type);   
// implements IFormatterConverter
   public object Convert(object value, TypeCode typeCode);
// implements IFormatterConverter
   public bool ToBoolean(object value); 
// implements IFormatterConverter
   public byte ToByte(object value);    
// implements IFormatterConverter
   public char ToChar(object value);    
// implements IFormatterConverter
   public DateTime ToDateTime(object value);         
// implements IFormatterConverter
   public decimal ToDecimal(object value);           
// implements IFormatterConverter
   public double ToDouble(object value);
// implements IFormatterConverter
   public short ToInt16(object value);  
// implements IFormatterConverter
   public int ToInt32(object value);    
// implements IFormatterConverter
   public long ToInt64(object value);   
// implements IFormatterConverter
   public sbyte ToSByte(object value);  
// implements IFormatterConverter
   public float ToSingle(object value); 
// implements IFormatterConverter
   public string ToString(object value);
// implements IFormatterConverter
   public ushort ToUInt16(object ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# in a Nutshell

C# in a Nutshell

Ben Albahari, Ted Neward, Peter Drayton
C# 7.0 in a Nutshell

C# 7.0 in a Nutshell

Joseph Albahari, Ben Albahari
C# Cookbook, 2nd Edition

C# Cookbook, 2nd Edition

Jay Hilyard, Stephen Teilhet
C# Cookbook

C# Cookbook

Stephen Teilhet, Jay Hilyard

Publisher Resources

ISBN: 0596005261Catalog PageErrata