SlideShare a Scribd company logo
1 of 242
Using the .NET Framework




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Objectives




         Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Objectives
 • Review using .NET Framework classes




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Objectives
 • Review using .NET Framework classes
 • Explore basic file IO operations




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Objectives
 • Review using .NET Framework classes
 • Explore basic file IO operations
 • Learn how to work with strings




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Objectives
 •   Review using .NET Framework classes
 •   Explore basic file IO operations
 •   Learn how to work with strings
 •   See how to work with dates and times




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
.NET Framework Base Class Library




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
.NET Framework Base Class Library
  • BCL consists of classes that provide base
    functionality for .NET Framework




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
.NET Framework Base Class Library
  • BCL consists of classes that provide base
    functionality for .NET Framework
     Many classes that make your life as a developer
      easier




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
.NET Framework Base Class Library
  • BCL consists of classes that provide base
    functionality for .NET Framework
     Many classes that make your life as a developer
      easier
     Library of classes used by all .NET applications




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
.NET Framework Base Class Library
  • BCL consists of classes that provide base
    functionality for .NET Framework
     Many classes that make your life as a developer
      easier
     Library of classes used by all .NET applications
  • Contains large number of classes (blocks of
    functionality, including properties, methods, and
    events)




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
.NET Framework Base Class Library
  • BCL consists of classes that provide base
    functionality for .NET Framework
     Many classes that make your life as a developer
      easier
     Library of classes used by all .NET applications
  • Contains large number of classes (blocks of
    functionality, including properties, methods, and
    events)
  • Namespaces group classes into common blocks
    of functionality


            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Some BCL Namespaces




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Some BCL Namespaces
 • System




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Some BCL Namespaces
 • System
 • System.Data




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Some BCL Namespaces
 • System
 • System.Data
 • System.Diagnostics




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Some BCL Namespaces
 •   System
 •   System.Data
 •   System.Diagnostics
 •   System.Globalization




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Some BCL Namespaces
 •   System
 •   System.Data
 •   System.Diagnostics
 •   System.Globalization
 •   System.IO




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Some BCL Namespaces
 •   System
 •   System.Data
 •   System.Diagnostics
 •   System.Globalization
 •   System.IO
 •   System.Text




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Some BCL Namespaces
 •   System
 •   System.Data
 •   System.Diagnostics
 •   System.Globalization
 •   System.IO
 •   System.Text
 •   System.Text.RegularExpressions




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Some BCL Namespaces
 •   System
 •   System.Data
 •   System.Diagnostics
 •   System.Globalization
 •   System.IO
 •   System.Text
 •   System.Text.RegularExpressions
 •   System.Web


            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Some BCL Namespaces
 •   System
 •   System.Data
 •   System.Diagnostics
 •   System.Globalization
 •   System.IO
 •   System.Text
 •   System.Text.RegularExpressions
 •   System.Web
 •   System.Windows.Forms

            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Using .NET Framework Classes




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Using .NET Framework Classes
 • Code you write in applications will be a mix of
   code that is specific to a language and code that
   uses .NET Framework classes




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Using .NET Framework Classes
   • Code you write in applications will be a mix of
     code that is specific to a language and code that
     uses .NET Framework classes
Dim amount As Decimal = 45.61D
Dim dollars, cents As Decimal

dollars = Decimal.Truncate(amount)
cents = amount - dollars

Console.WriteLine( _
 "The restaurant bill is {0:C}", _
 amount)
Console.WriteLine( _
 "You pay the {0:C} and " & _
 "I'll pay the {1:C}", _
 dollars, cents)



                        Learn More @ http://www.learnnowonline.com
                             Copyright © by Application Developers Training Company
Using .NET Framework Classes
   • Code you write in applications will be a mix of
     code that is specific to a language and code that
     uses .NET Framework classes
Dim amount As Decimal = 45.61D                            decimal amount = 45.61M;
Dim dollars, cents As Decimal                             decimal dollars, cents;

dollars = Decimal.Truncate(amount)                        dollars = decimal.Truncate(amount);
cents = amount - dollars                                  cents = amount - collars;

Console.WriteLine( _                                      Console.WriteLine(
 "The restaurant bill is {0:C}", _                         "The restaurant bill is {0:C}",
 amount)                                                   amount);
Console.WriteLine( _                                      Console.WriteLine(
 "You pay the {0:C} and " & _                              "You pay the {0:C} and " +
 "I'll pay the {1:C}", _                                   "I'll pay the {1:C}",
 dollars, cents)                                           dollars, cents);



                        Learn More @ http://www.learnnowonline.com
                             Copyright © by Application Developers Training Company
Generating Random Numbers




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Generating Random Numbers
 • Use Random class to generate a series of
   random numbers




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Generating Random Numbers
 • Use Random class to generate a series of
   random numbers
    Generated random numbers start with seed value




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Generating Random Numbers
 • Use Random class to generate a series of
   random numbers
    Generated random numbers start with seed value
    Specify seed value or use default seed value




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Generating Random Numbers
 • Use Random class to generate a series of
   random numbers
    Generated random numbers start with seed value
    Specify seed value or use default seed value
 • Next generates the next random number in a
   sequence




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Getting Information about the Computer




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running
   • Properties




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running
   • Properties
       MachineName returns name of computer




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running
   • Properties
       MachineName returns name of computer
       UserName returns name of user




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running
   • Properties
       MachineName returns name of computer
       UserName returns name of user
       OSVersion returns operating system name and version




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running
   • Properties
         MachineName returns name of computer
         UserName returns name of user
         OSVersion returns operating system name and version
         CurrentDirectory returns program’s directory at runtime




                 Learn More @ http://www.learnnowonline.com
                    Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running
   • Properties
         MachineName returns name of computer
         UserName returns name of user
         OSVersion returns operating system name and version
         CurrentDirectory returns program’s directory at runtime
         Version returns version of the CLR




                 Learn More @ http://www.learnnowonline.com
                    Copyright © by Application Developers Training Company
Getting Information about the Computer
   • Environment class provides information on the
     computer and the environment in which the computer is
     running
   • Properties
         MachineName returns name of computer
         UserName returns name of user
         OSVersion returns operating system name and version
         CurrentDirectory returns program’s directory at runtime
         Version returns version of the CLR
   • Use GetFolderPath and SpecialFolder enumeration
     to refer to My Documents, desktop, etc.

                 Learn More @ http://www.learnnowonline.com
                    Copyright © by Application Developers Training Company
Working with XML




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Working with XML
 • System.Xml namespace contains classes that
   support reading and writing XML




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Working with XML
 • System.Xml namespace contains classes that
   support reading and writing XML
 • Quick review of XML




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Working with XML
 • System.Xml namespace contains classes that
   support reading and writing XML
 • Quick review of XML
    XML documents are based on elements




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Working with XML
 • System.Xml namespace contains classes that
   support reading and writing XML
 • Quick review of XML
    XML documents are based on elements
    Element comprised of start tag, content, and end tag




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with XML
 • System.Xml namespace contains classes that
   support reading and writing XML
 • Quick review of XML
    XML documents are based on elements
    Element comprised of start tag, content, and end tag
    Elements can contain other elements




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with XML
 • System.Xml namespace contains classes that
   support reading and writing XML
 • Quick review of XML
      XML documents are based on elements
      Element comprised of start tag, content, and end tag
      Elements can contain other elements
      Attributes contain information about elements




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Working with XML
 • System.Xml namespace contains classes that
   support reading and writing XML
 • Quick review of XML
      XML documents are based on elements
      Element comprised of start tag, content, and end tag
      Elements can contain other elements
      Attributes contain information about elements
       <chapters total = "2">
        <chapter>Variables and Data Types</chapter>
        <chapter>Using the .NET Framework</chapter>
       </chapters>



                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Writing XML Files




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Writing XML Files
 • Use XmlWriter class to write XML to file or in
   memory




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • Use XmlWriter class to write XML to file or in
   memory
    Use Create to create a new instance and pass the
     name of an XML file as a parameter




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • Use XmlWriter class to write XML to file or in
   memory
    Use Create to create a new instance and pass the
     name of an XML file as a parameter
 • Use XmlWriterSettings class to control how
   XML is written




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • Use XmlWriter class to write XML to file or in
   memory
    Use Create to create a new instance and pass the
     name of an XML file as a parameter
 • Use XmlWriterSettings class to control how
   XML is written
    Indent specifies that elements should be indented




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • Use XmlWriter class to write XML to file or in
   memory
    Use Create to create a new instance and pass the
     name of an XML file as a parameter
 • Use XmlWriterSettings class to control how
   XML is written
    Indent specifies that elements should be indented
    IndentChars specifies the character to use




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • Use XmlWriter class to write XML to file or in
   memory
    Use Create to create a new instance and pass the
     name of an XML file as a parameter
 • Use XmlWriterSettings class to control how
   XML is written
    Indent specifies that elements should be indented
    IndentChars specifies the character to use
    NewLineChars specifies the character for line
     breaks

           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag
   <chapters>




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag
   <chapters>
 • WriteEndElement adds a closing tag




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag
   <chapters>
 • WriteEndElement adds a closing tag
   </chapters>




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag
   <chapters>
 • WriteEndElement adds a closing tag
   </chapters>
 • WriteAttributeString writes an attribute and its value




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag
   <chapters>
 • WriteEndElement adds a closing tag
   </chapters>
 • WriteAttributeString writes an attribute and its value
   <chapters total = "2“>




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag
   <chapters>
 • WriteEndElement adds a closing tag
   </chapters>
 • WriteAttributeString writes an attribute and its value
   <chapters total = "2“>
 • WriteElement adds an element and its value


            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Writing XML Files
 • WriteStartDocument writes XML declaration
   <?xml version="1.0" encoding="utf-8"
     standalone="yes"?>
 • WriteStartElement adds an XML tag
   <chapters>
 • WriteEndElement adds a closing tag
   </chapters>
 • WriteAttributeString writes an attribute and its value
   <chapters total = "2“>
 • WriteElement adds an element and its value
   <chapter>Using the .NET Framework</chapter>

            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Reading XML Files




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Reading XML Files
 • Use XmlReader class to read XML from file or
   from memory




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Reading XML Files
 • Use XmlReader class to read XML from file or
   from memory
    Use Create to create a new instance and pass name
     of XML file as parameter




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Reading XML Files
 • Use XmlReader class to read XML from file or
   from memory
    Use Create to create a new instance and pass name
     of XML file as parameter
 • Read reads each node in the XML one at a time




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Reading XML Files
 • Use XmlReader class to read XML from file or
   from memory
    Use Create to create a new instance and pass name
     of XML file as parameter
 • Read reads each node in the XML one at a time
    Use NodeType to determine if a node is an element
     or text, etc.




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Reading XML Files
 • Use XmlReader class to read XML from file or
   from memory
    Use Create to create a new instance and pass name
     of XML file as parameter
 • Read reads each node in the XML one at a time
    Use NodeType to determine if a node is an element
     or text, etc.
 • ReadToFollowing reads through XML until it
   finds the next element with a specified name



           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Reading XML Files
 • Use XmlReader class to read XML from file or
   from memory
    Use Create to create a new instance and pass name
     of XML file as parameter
 • Read reads each node in the XML one at a time
    Use NodeType to determine if a node is an element
     or text, etc.
 • ReadToFollowing reads through XML until it
   finds the next element with a specified name
 • ReadInnerXml reads the content of an

           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
File Input/Output




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
File Input/Output
 • System.IO namespace contains classes for
   writing to and reading from files and for
   managing drives, directories, and files




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Writing to and Reading from Files




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Writing to and Reading from Files
  • StreamWriter class creates and writes to file




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Writing to and Reading from Files
  • StreamWriter class creates and writes to file
     Write adds text to file




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Writing to and Reading from Files
  • StreamWriter class creates and writes to file
     Write adds text to file
     WriteLine adds text and line break to file




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Writing to and Reading from Files
  • StreamWriter class creates and writes to file
     Write adds text to file
     WriteLine adds text and line break to file
  • StreamReader class reads from file




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Writing to and Reading from Files
  • StreamWriter class creates and writes to file
     Write adds text to file
     WriteLine adds text and line break to file
  • StreamReader class reads from file
     Read reads text from file




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Writing to and Reading from Files
  • StreamWriter class creates and writes to file
     Write adds text to file
     WriteLine adds text and line break to file
  • StreamReader class reads from file
     Read reads text from file
     ReadLine reads lines of text from file




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Files




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files
 • Exists returns true if file exists




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files
 • Exists returns true if file exists
 • Create creates a file




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files
 • Exists returns true if file exists
 • Create creates a file
    Returns an instance of FileStream class




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files
 • Exists returns true if file exists
 • Create creates a file
    Returns an instance of FileStream class
      o   Use AppendText to add text to a file




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files
 • Exists returns true if file exists
 • Create creates a file
    Returns an instance of FileStream class
      o   Use AppendText to add text to a file
      o   Use CreateText to add text after removing existing text




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files
 • Exists returns true if file exists
 • Create creates a file
    Returns an instance of FileStream class
      o   Use AppendText to add text to a file
      o   Use CreateText to add text after removing existing text
      o   Both of these return an instance of StreamWriter class



              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Files
 • FileInfo class contains methods for copying,
   moving, renaming, creating, opening, deleting,
   and appending to files
 • Exists returns true if file exists
 • Create creates a file
    Returns an instance of FileStream class
      o   Use AppendText to add text to a file
      o   Use CreateText to add text after removing existing text
      o   Both of these return an instance of StreamWriter class
            • Use Write and WriteLine to write text to a file


              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Files




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information
     Name returns file name




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information
     Name returns file name
     FullName returns full path including file name




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information
     Name returns file name
     FullName returns full path including file name
     Length returns file size




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information
       Name returns file name
       FullName returns full path including file name
       Length returns file size
       IsReadOnly returns true if file is read-only




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information
       Name returns file name
       FullName returns full path including file name
       Length returns file size
       IsReadOnly returns true if file is read-only
       CreationTime returns when file was created




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information
       Name returns file name
       FullName returns full path including file name
       Length returns file size
       IsReadOnly returns true if file is read-only
       CreationTime returns when file was created
       LastAccessTime returns when file was last
        accessed




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Files
 • FileInfo properties to retrieve file information
       Name returns file name
       FullName returns full path including file name
       Length returns file size
       IsReadOnly returns true if file is read-only
       CreationTime returns when file was created
       LastAccessTime returns when file was last
        accessed
 • CopyTo copies a file


              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Managing Directories




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Managing Directories
 • DirectoryInfo class contains methods for
   creating, moving, and deleting directories, as
   well as getting a list of files in the directory




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Directories
 • DirectoryInfo class contains methods for
   creating, moving, and deleting directories, as
   well as getting a list of files in the directory
 • Exists returns true if a directory exists




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Directories
 • DirectoryInfo class contains methods for
   creating, moving, and deleting directories, as
   well as getting a list of files in the directory
 • Exists returns true if a directory exists
 • Create creates a directory




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Directories
 • DirectoryInfo class contains methods for
   creating, moving, and deleting directories, as
   well as getting a list of files in the directory
 • Exists returns true if a directory exists
 • Create creates a directory
 • Delete removes a directory




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Directories
 • DirectoryInfo class contains methods for
   creating, moving, and deleting directories, as
   well as getting a list of files in the directory
 • Exists returns true if a directory exists
 • Create creates a directory
 • Delete removes a directory
 • Name returns the name of a directory




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Managing Directories
 • DirectoryInfo class contains methods for
   creating, moving, and deleting directories, as
   well as getting a list of files in the directory
 • Exists returns true if a directory exists
 • Create creates a directory
 • Delete removes a directory
 • Name returns the name of a directory
 • FullName returns the full path and name of a
   directory

           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Getting Information from Drives




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information
     Name returns drive name




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information
     Name returns drive name
     DriveType returns drive type, e.g., Fixed, Network, CDRom




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information
     Name returns drive name
     DriveType returns drive type, e.g., Fixed, Network, CDRom
     DriveFormat returns file system name, e.g., NTFS or FAT32




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information
       Name returns drive name
       DriveType returns drive type, e.g., Fixed, Network, CDRom
       DriveFormat returns file system name, e.g., NTFS or FAT32
       VolumeLabel returns volume label




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information
       Name returns drive name
       DriveType returns drive type, e.g., Fixed, Network, CDRom
       DriveFormat returns file system name, e.g., NTFS or FAT32
       VolumeLabel returns volume label
       IsReady returns true if drive is ready for read or read/write
        operations




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information
     Name returns drive name
     DriveType returns drive type, e.g., Fixed, Network, CDRom
     DriveFormat returns file system name, e.g., NTFS or FAT32
     VolumeLabel returns volume label
     IsReady returns true if drive is ready for read or read/write
      operations
     TotalSize returns total storage capacity




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Getting Information from Drives
 • DriveInfo class returns information from a drive
 • GetDrives returns a list of all drives on a computer
 • Properties to view drive information
     Name returns drive name
     DriveType returns drive type, e.g., Fixed, Network, CDRom
     DriveFormat returns file system name, e.g., NTFS or FAT32
     VolumeLabel returns volume label
     IsReady returns true if drive is ready for read or read/write
      operations
     TotalSize returns total storage capacity
     TotalFreeSpace returns total amount of free space available


              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Working with Strings




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Working with Strings
 • Wide variety of tasks you might want to
   accomplish when working with strings




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with Strings
 • Wide variety of tasks you might want to
   accomplish when working with strings
    Separate out first and last name from string
     representing someone’s full name




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with Strings
 • Wide variety of tasks you might want to
   accomplish when working with strings
    Separate out first and last name from string
     representing someone’s full name
    Convert string to all uppercase




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with Strings
 • Wide variety of tasks you might want to
   accomplish when working with strings
    Separate out first and last name from string
     representing someone’s full name
    Convert string to all uppercase
    Concatenate two strings representing a first and last
     name and create a string containing a last name,
     followed by a comma, followed by a first name




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with Strings
 • Wide variety of tasks you might want to
   accomplish when working with strings
    Separate out first and last name from string
     representing someone’s full name
    Convert string to all uppercase
    Concatenate two strings representing a first and last
     name and create a string containing a last name,
     followed by a comma, followed by a first name
    Display a number in currency format, for example
     $9,999.99


           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
String Class Fields and Properties




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
String Class Fields and Properties
 • Empty represents an empty string




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
String Class Fields and Properties
 • Empty represents an empty string
 • Length returns the number of characters




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
String Class Fields and Properties
 • Empty represents an empty string
 • Length returns the number of characters
 • Chars returns a character at a position in a
   string




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
String Class Methods




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
String Class Methods
 • String class includes methods for a variety of
   tasks




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
String Class Methods
 • String class includes methods for a variety of
   tasks
    Comparing two strings




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
String Class Methods
 • String class includes methods for a variety of
   tasks
    Comparing two strings
    Searching for a string in another string




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
String Class Methods
 • String class includes methods for a variety of
   tasks
    Comparing two strings
    Searching for a string in another string
    Modifying all or some of a string




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
String Class Methods
 • String class includes methods for a variety of
   tasks
      Comparing two strings
      Searching for a string in another string
      Modifying all or some of a string
      Extracting part of a string from a string




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
String Class Methods
 • String class includes methods for a variety of
   tasks
      Comparing two strings
      Searching for a string in another string
      Modifying all or some of a string
      Extracting part of a string from a string
      Formatting the display of a string




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Comparing Strings




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Comparing Strings
 • Compare takes as parameters two strings




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Comparing Strings
 • Compare takes as parameters two strings
    Returns negative number if the first string is less
     than the second, 0 if they are equal, and a positive
     number if the first string is greater than the second




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Comparing Strings
 • Compare takes as parameters two strings
    Returns negative number if the first string is less
     than the second, 0 if they are equal, and a positive
     number if the first string is greater than the second
 • Equals takes as parameters two strings




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Comparing Strings
 • Compare takes as parameters two strings
    Returns negative number if the first string is less
     than the second, 0 if they are equal, and a positive
     number if the first string is greater than the second
 • Equals takes as parameters two strings
    Returns true if two strings are equal




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Comparing Strings
 • Compare takes as parameters two strings
    Returns negative number if the first string is less
     than the second, 0 if they are equal, and a positive
     number if the first string is greater than the second
 • Equals takes as parameters two strings
    Returns true if two strings are equal
 • CompareTo method of a string takes as
   parameter a string to compare



            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Comparing Strings
 • Compare takes as parameters two strings
    Returns negative number if the first string is less
     than the second, 0 if they are equal, and a positive
     number if the first string is greater than the second
 • Equals takes as parameters two strings
    Returns true if two strings are equal
 • CompareTo method of a string takes as
   parameter a string to compare
    Returns a negative number if the first string is less
     than second, 0 if they are equal, and a positive

            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Searching in Strings




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Searching in Strings
 • StartsWith, EndsWith, Contains and
   IndexOf all test for the existence of one string
   within another string




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Searching in Strings
 • StartsWith, EndsWith, Contains and
   IndexOf all test for the existence of one string
   within another string
    All are methods of the first string and take the
     second string as the parameter




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Searching in Strings
 • StartsWith, EndsWith, Contains and
   IndexOf all test for the existence of one string
   within another string
    All are methods of the first string and take the
     second string as the parameter
    StartsWith, EndsWith, and Contains return true if
     the second string is found in the first string




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Searching in Strings
 • StartsWith, EndsWith, Contains and
   IndexOf all test for the existence of one string
   within another string
    All are methods of the first string and take the
     second string as the parameter
    StartsWith, EndsWith, and Contains return true if
     the second string is found in the first string
    IndexOf returns an integer representing the starting
     point of the second string



           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Modifying Strings




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Modifying Strings
 • Insert adds a string at a specified position




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Modifying Strings
 • Insert adds a string at a specified position
 • Remove removes all characters between two
   positions




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Modifying Strings
 • Insert adds a string at a specified position
 • Remove removes all characters between two
   positions
    Specify the start position to remove all characters
     from the start to the end of a string




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Modifying Strings
 • Insert adds a string at a specified position
 • Remove removes all characters between two
   positions
    Specify the start position to remove all characters
     from the start to the end of a string
    Specify the start and end position to remove all
     characters from the start through the end position




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Modifying Strings
 • Insert adds a string at a specified position
 • Remove removes all characters between two
   positions
    Specify the start position to remove all characters
     from the start to the end of a string
    Specify the start and end position to remove all
     characters from the start through the end position
 • Replace replaces part of a string with another
   string



            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Modifying Strings
 • Insert adds a string at a specified position
 • Remove removes all characters between two
   positions
    Specify the start position to remove all characters
     from the start to the end of a string
    Specify the start and end position to remove all
     characters from the start through the end position
 • Replace replaces part of a string with another
   string
    Replace a character with another character


            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Modifying Strings




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Modifying Strings
 • Trim eliminates white space from beginning
   and end




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Modifying Strings
 • Trim eliminates white space from beginning
   and end
 • TrimStart eliminates white space from
   beginning




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Modifying Strings
 • Trim eliminates white space from beginning
   and end
 • TrimStart eliminates white space from
   beginning
 • TrimEnd eliminates white space from end




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Modifying Strings
 • Trim eliminates white space from beginning
   and end
 • TrimStart eliminates white space from
   beginning
 • TrimEnd eliminates white space from end
 • PadLeft adds white space or character to
   beginning




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Modifying Strings
 • Trim eliminates white space from beginning
   and end
 • TrimStart eliminates white space from
   beginning
 • TrimEnd eliminates white space from end
 • PadLeft adds white space or character to
   beginning
 • PadRight adds white space or character to end


          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Modifying Strings
 • Trim eliminates white space from beginning
   and end
 • TrimStart eliminates white space from
   beginning
 • TrimEnd eliminates white space from end
 • PadLeft adds white space or character to
   beginning
 • PadRight adds white space or character to end
 • ToUpper converts string to uppercase

          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Extracting Strings




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Extracting Strings
 • Substring retrieves part of a string




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Extracting Strings
 • Substring retrieves part of a string
     First parameter specifies position representing start
      of string you want to retrieve




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Extracting Strings
 • Substring retrieves part of a string
     First parameter specifies position representing start
      of string you want to retrieve
     Optional second parameter specifies length of string
      you want to retrieve




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Extracting Strings
 • Substring retrieves part of a string
     First parameter specifies position representing start
      of string you want to retrieve
     Optional second parameter specifies length of string
      you want to retrieve
 • Split retrieves multiple parts of a string




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Extracting Strings
 • Substring retrieves part of a string
     First parameter specifies position representing start
      of string you want to retrieve
     Optional second parameter specifies length of string
      you want to retrieve
 • Split retrieves multiple parts of a string
     Takes as parameter an array containing characters
      used as delimiters, or separators (e.g. , or | or tab)




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Extracting Strings
 • Substring retrieves part of a string
     First parameter specifies position representing start
      of string you want to retrieve
     Optional second parameter specifies length of string
      you want to retrieve
 • Split retrieves multiple parts of a string
     Takes as parameter an array containing characters
      used as delimiters, or separators (e.g. , or | or tab)
     Returns an array containing parts of the string
      separated by characters listed in an array


             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Formatting Strings




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed
 • Formatting numbers




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed
 • Formatting numbers
    C or c displays as currency: $121,246,424.00




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed
 • Formatting numbers
    C or c displays as currency: $121,246,424.00
    D or d displays a string as a decimal: 121246424




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed
 • Formatting numbers
    C or c displays as currency: $121,246,424.00
    D or d displays a string as a decimal: 121246424
    E or e displays in scientific (exponential) form:
     1.212464E+008




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed
 • Formatting numbers
    C or c displays as currency: $121,246,424.00
    D or d displays a string as a decimal: 121246424
    E or e displays in scientific (exponential) form:
     1.212464E+008
    F or f displays as a fixed-point number:
     121246424.00




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed
 • Formatting numbers
    C or c displays as currency: $121,246,424.00
    D or d displays a string as a decimal: 121246424
    E or e displays in scientific (exponential) form:
     1.212464E+008
    F or f displays as a fixed-point number:
     121246424.00
    G or g displays in general format: 121246424


           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings
 • Use format specifiers to control how a string is
   displayed
 • Formatting numbers
    C or c displays as currency: $121,246,424.00
    D or d displays a string as a decimal: 121246424
    E or e displays in scientific (exponential) form:
     1.212464E+008
    F or f displays as a fixed-point number:
     121246424.00
    G or g displays in general format: 121246424
    N or n displays as a number: 121,246,424.00

           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Formatting Strings




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
     d displays in short date pattern: 1/1/2100




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
     d displays in short date pattern: 1/1/2100
     D displays in long date pattern: Friday, January 01, 2100




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
     d displays in short date pattern: 1/1/2100
     D displays in long date pattern: Friday, January 01, 2100
     t displays in short time pattern: 12:00 AM




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
       d displays in short date pattern: 1/1/2100
       D displays in long date pattern: Friday, January 01, 2100
       t displays in short time pattern: 12:00 AM
       T displays in long time pattern: 12:00:00 AM




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
       d displays in short date pattern: 1/1/2100
       D displays in long date pattern: Friday, January 01, 2100
       t displays in short time pattern: 12:00 AM
       T displays in long time pattern: 12:00:00 AM
       f displays in full date/time pattern (short time):
        Friday, January 01, 2100 12:00 AM




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
     d displays in short date pattern: 1/1/2100
     D displays in long date pattern: Friday, January 01, 2100
     t displays in short time pattern: 12:00 AM
     T displays in long time pattern: 12:00:00 AM
     f displays in full date/time pattern (short time):
      Friday, January 01, 2100 12:00 AM
     F displays in full date/time pattern (long time):
      Friday, January 01, 2100 12:00:00 AM




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
     d displays in short date pattern: 1/1/2100
     D displays in long date pattern: Friday, January 01, 2100
     t displays in short time pattern: 12:00 AM
     T displays in long time pattern: 12:00:00 AM
     f displays in full date/time pattern (short time):
      Friday, January 01, 2100 12:00 AM
     F displays in full date/time pattern (long time):
      Friday, January 01, 2100 12:00:00 AM
     g displays in general date/time pattern (short time):
      1/1/2100 12:00 AM




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Formatting Strings
 • Formatting dates
     d displays in short date pattern: 1/1/2100
     D displays in long date pattern: Friday, January 01, 2100
     t displays in short time pattern: 12:00 AM
     T displays in long time pattern: 12:00:00 AM
     f displays in full date/time pattern (short time):
      Friday, January 01, 2100 12:00 AM
     F displays in full date/time pattern (long time):
      Friday, January 01, 2100 12:00:00 AM
     g displays in general date/time pattern (short time):
      1/1/2100 12:00 AM
     G displays in general date/time pattern (long time):
      1/1/2100 12:00:00 AM


              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Using the StringBuilder Class




         Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Using the StringBuilder Class
 • Strings are immutable so each time you use a string
   operator a new string is created




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Using the StringBuilder Class
 • Strings are immutable so each time you use a string
   operator a new string is created
 • StringBuilder is more efficient and represents one
   string in memory




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Using the StringBuilder Class
 • Strings are immutable so each time you use a string
   operator a new string is created
 • StringBuilder is more efficient and represents one
   string in memory
 • Append adds a string to the end of an existing string




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Using the StringBuilder Class
 • Strings are immutable so each time you use a string
   operator a new string is created
 • StringBuilder is more efficient and represents one
   string in memory
 • Append adds a string to the end of an existing string
 • AppendLine adds a string followed by a line break to
   an existing string




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Using the StringBuilder Class
 • Strings are immutable so each time you use a string
   operator a new string is created
 • StringBuilder is more efficient and represents one
   string in memory
 • Append adds a string to the end of an existing string
 • AppendLine adds a string followed by a line break to
   an existing string
 • Insert adds a string to an existing string at a specific
   position




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Using the StringBuilder Class
 • Strings are immutable so each time you use a string
   operator a new string is created
 • StringBuilder is more efficient and represents one
   string in memory
 • Append adds a string to the end of an existing string
 • AppendLine adds a string followed by a line break to
   an existing string
 • Insert adds a string to an existing string at a specific
   position
 • Replace replaces all occurrences of one string with
   another string


             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Working with Dates and Times




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Working with Dates and Times
 • Dates and times are represented by DateTime
   structure




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Working with Dates and Times
 • Dates and times are represented by DateTime
   structure
 • Date and time intervals are represented by
   TimeSpan structure




          Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
DateTime Structure Properties




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
     Date




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
     Date
     Month




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
     Date
     Month
     Day




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
       Date
       Month
       Day
       Year




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
       Date
       Month
       Day
       Year
       DayOfWeek




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
       Date
       Month
       Day
       Year
       DayOfWeek
       DayOfYear




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
       Date
       Month
       Day
       Year
       DayOfWeek
       DayOfYear
       TimeOfDay




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
       Date
       Month
       Day
       Year
       DayOfWeek
       DayOfYear
       TimeOfDay
       Hour




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
       Date
       Month
       Day
       Year
       DayOfWeek
       DayOfYear
       TimeOfDay
       Hour
       Minute



             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Properties
 • Today returns current date
 • Now returns current date and time
 • To determine the components of date or time use
       Date
       Month
       Day
       Year
       DayOfWeek
       DayOfYear
       TimeOfDay
       Hour
       Minute
       Second


             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Methods




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
     ToLongDateString, displays date in long format




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
     ToLongDateString, displays date in long format
     ToLongTimeString, displays time in long format




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
     ToLongDateString, displays date in long format
     ToLongTimeString, displays time in long format
     ToShortDateString, displays date in short format




             Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format
 • To find date in future or past use




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format
 • To find date in future or past use
     AddDays




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format
 • To find date in future or past use
     AddDays
     AddMonths




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format
 • To find date in future or past use
     AddDays
     AddMonths
     AddYears




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format
 • To find date in future or past use
       AddDays
       AddMonths
       AddYears
       AddHours




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format
 • To find date in future or past use
       AddDays
       AddMonths
       AddYears
       AddHours
       AddMinutes



               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
DateTime Structure Methods
 • To convert DateTime variable to string use
       ToLongDateString, displays date in long format
       ToLongTimeString, displays time in long format
       ToShortDateString, displays date in short format
       ToShortTimeString, displays time in short format
 • To find date in future or past use
       AddDays
       AddMonths
       AddYears
       AddHours
       AddMinutes
       AddSeconds


               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Using the TimeSpan Structure




        Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use




            Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
     Days - # of whole days in interval




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
     Days - # of whole days in interval
     Hours - # of whole hours in interval




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
     Days - # of whole days in interval
     Hours - # of whole hours in interval
     Minutes - # of whole minutes in interval




              Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
       Days - # of whole days in interval
       Hours - # of whole hours in interval
       Minutes - # of whole minutes in interval
       Seconds - # of whole seconds in interval




               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
       Days - # of whole days in interval
       Hours - # of whole hours in interval
       Minutes - # of whole minutes in interval
       Seconds - # of whole seconds in interval
       Milliseconds - # of whole milliseconds in interval




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
       Days - # of whole days in interval
       Hours - # of whole hours in interval
       Minutes - # of whole minutes in interval
       Seconds - # of whole seconds in interval
       Milliseconds - # of whole milliseconds in interval
       TotalDays - # of whole and fractional days in interval




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
       Days - # of whole days in interval
       Hours - # of whole hours in interval
       Minutes - # of whole minutes in interval
       Seconds - # of whole seconds in interval
       Milliseconds - # of whole milliseconds in interval
       TotalDays - # of whole and fractional days in interval
       TotalHours - # of whole and fractional hours in interval




                Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
       Days - # of whole days in interval
       Hours - # of whole hours in interval
       Minutes - # of whole minutes in interval
       Seconds - # of whole seconds in interval
       Milliseconds - # of whole milliseconds in interval
       TotalDays - # of whole and fractional days in interval
       TotalHours - # of whole and fractional hours in interval
       TotalMinutes - # of whole and fractional minutes in interval



               Learn More @ http://www.learnnowonline.com
                   Copyright © by Application Developers Training Company
Using the TimeSpan Structure
 • TimeSpan represents the duration of time measured in
   ticks (100 nanoseconds)
 • To determine the components of date or time use
       Days - # of whole days in interval
       Hours - # of whole hours in interval
       Minutes - # of whole minutes in interval
       Seconds - # of whole seconds in interval
       Milliseconds - # of whole milliseconds in interval
       TotalDays - # of whole and fractional days in interval
       TotalHours - # of whole and fractional hours in interval
       TotalMinutes - # of whole and fractional minutes in interval
       TotalSeconds - # of whole and fractional seconds in interval


               Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Learn More!




       Learn More @ http://www.learnnowonline.com
          Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!


• Learn more about .NET on SlideShare:




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!


• Learn more about .NET on SlideShare:
  • Getting Started with .NET




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Learn More!
• This is an excerpt from a larger course. Visit
  www.learnnowonline.com for the full details!


• Learn more about .NET on SlideShare:
  • Getting Started with .NET
  • .NET Variables and Data Types




           Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company

More Related Content

What's hot

DevOps Essentials: An Introductory Workshop on CI/CD Practices
DevOps Essentials: An Introductory Workshop on CI/CD PracticesDevOps Essentials: An Introductory Workshop on CI/CD Practices
DevOps Essentials: An Introductory Workshop on CI/CD PracticesAmazon Web Services
 
Working with the Microsoft Office Object Models
Working with the Microsoft Office Object ModelsWorking with the Microsoft Office Object Models
Working with the Microsoft Office Object ModelsLearnNowOnline
 
React native introduction
React native introductionReact native introduction
React native introductionInnerFood
 
Managing site collections
Managing site collectionsManaging site collections
Managing site collectionsLearnNowOnline
 
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...Amazon Web Services
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWSAmazon Web Services
 
Build a Serverless Web Application in One Day
Build a Serverless Web Application in One DayBuild a Serverless Web Application in One Day
Build a Serverless Web Application in One DayAmazon Web Services
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAmazon Web Services
 
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)Gabriel Walt
 
Build an Infra Product with AWS Fargate
Build an Infra Product with AWS FargateBuild an Infra Product with AWS Fargate
Build an Infra Product with AWS FargateWill Button
 
Devfest SouthWest, Nigeria - Firebase
Devfest SouthWest, Nigeria - FirebaseDevfest SouthWest, Nigeria - Firebase
Devfest SouthWest, Nigeria - FirebaseMoyinoluwa Adeyemi
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: IntroductionInnerFood
 
Extra aem development tools by Justin Edelson
Extra aem development tools by Justin EdelsonExtra aem development tools by Justin Edelson
Extra aem development tools by Justin EdelsonAEM HUB
 
Design, Build, and Modernize Your Web Applications with AWS
 Design, Build, and Modernize Your Web Applications with AWS Design, Build, and Modernize Your Web Applications with AWS
Design, Build, and Modernize Your Web Applications with AWSDonnie Prakoso
 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQNetcetera
 

What's hot (20)

DevOps Essentials: An Introductory Workshop on CI/CD Practices
DevOps Essentials: An Introductory Workshop on CI/CD PracticesDevOps Essentials: An Introductory Workshop on CI/CD Practices
DevOps Essentials: An Introductory Workshop on CI/CD Practices
 
Working with the Microsoft Office Object Models
Working with the Microsoft Office Object ModelsWorking with the Microsoft Office Object Models
Working with the Microsoft Office Object Models
 
React native introduction
React native introductionReact native introduction
React native introduction
 
Managing site collections
Managing site collectionsManaging site collections
Managing site collections
 
API Basics
API BasicsAPI Basics
API Basics
 
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWS
 
Serverless DevOps to the Rescue
Serverless DevOps to the RescueServerless DevOps to the Rescue
Serverless DevOps to the Rescue
 
Build a Serverless Web Application in One Day
Build a Serverless Web Application in One DayBuild a Serverless Web Application in One Day
Build a Serverless Web Application in One Day
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step Functions
 
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
 
Build an Infra Product with AWS Fargate
Build an Infra Product with AWS FargateBuild an Infra Product with AWS Fargate
Build an Infra Product with AWS Fargate
 
Serverless - State Of the Union
Serverless - State Of the UnionServerless - State Of the Union
Serverless - State Of the Union
 
Devfest SouthWest, Nigeria - Firebase
Devfest SouthWest, Nigeria - FirebaseDevfest SouthWest, Nigeria - Firebase
Devfest SouthWest, Nigeria - Firebase
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: Introduction
 
Deep dive into AWS fargate
Deep dive into AWS fargateDeep dive into AWS fargate
Deep dive into AWS fargate
 
Extra aem development tools by Justin Edelson
Extra aem development tools by Justin EdelsonExtra aem development tools by Justin Edelson
Extra aem development tools by Justin Edelson
 
Design, Build, and Modernize Your Web Applications with AWS
 Design, Build, and Modernize Your Web Applications with AWS Design, Build, and Modernize Your Web Applications with AWS
Design, Build, and Modernize Your Web Applications with AWS
 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
 

Viewers also liked

Vb net xp_10
Vb net xp_10Vb net xp_10
Vb net xp_10Niit Care
 
File handling in vb.net
File handling in vb.netFile handling in vb.net
File handling in vb.netEverywhere
 
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0Antonio Chagoury
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsQuontra Solutions
 
Using MongoDB with the .Net Framework
Using MongoDB with the .Net FrameworkUsing MongoDB with the .Net Framework
Using MongoDB with the .Net FrameworkStefano Paluello
 
Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.raj upadhyay
 
Inside .net framework
Inside .net frameworkInside .net framework
Inside .net frameworkFaisal Aziz
 
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Mohamed Saleh
 
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0ligaoren
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version Historyvoltaincx
 
Improving The Software Development Lifecycle With Visual Studio Team System
Improving The Software Development Lifecycle With Visual Studio Team SystemImproving The Software Development Lifecycle With Visual Studio Team System
Improving The Software Development Lifecycle With Visual Studio Team Systemmatthewphillips
 
Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Bhushan Mulmule
 

Viewers also liked (20)

File handling
File handlingFile handling
File handling
 
Vb net xp_10
Vb net xp_10Vb net xp_10
Vb net xp_10
 
File handling in vb.net
File handling in vb.netFile handling in vb.net
File handling in vb.net
 
Intake 37 11
Intake 37 11Intake 37 11
Intake 37 11
 
Listview
ListviewListview
Listview
 
.net framework
.net framework.net framework
.net framework
 
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
 
.Net framework
.Net framework.Net framework
.Net framework
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutions
 
Introduction of .net framework
Introduction of .net frameworkIntroduction of .net framework
Introduction of .net framework
 
Using MongoDB with the .Net Framework
Using MongoDB with the .Net FrameworkUsing MongoDB with the .Net Framework
Using MongoDB with the .Net Framework
 
Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.
 
Inside .net framework
Inside .net frameworkInside .net framework
Inside .net framework
 
.Net framework
.Net framework.Net framework
.Net framework
 
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
 
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version History
 
Improving The Software Development Lifecycle With Visual Studio Team System
Improving The Software Development Lifecycle With Visual Studio Team SystemImproving The Software Development Lifecycle With Visual Studio Team System
Improving The Software Development Lifecycle With Visual Studio Team System
 
Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Overview of .Net Framework 4.5
Overview of .Net Framework 4.5
 

Similar to Using .NET Framework classes for file IO, strings, dates and random numbers

Getting Started with .NET
Getting Started with .NETGetting Started with .NET
Getting Started with .NETLearnNowOnline
 
Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5LearnNowOnline
 
What's new in Silverlight 5
What's new in Silverlight 5What's new in Silverlight 5
What's new in Silverlight 5LearnNowOnline
 
Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...
Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...
Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...Amazon Web Services
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity FrameworkLearnNowOnline
 
DevOps Spain 2019. Pedro Mendoza-AWS
DevOps Spain 2019. Pedro Mendoza-AWSDevOps Spain 2019. Pedro Mendoza-AWS
DevOps Spain 2019. Pedro Mendoza-AWSatSistemas
 
.Net branching and flow control
.Net branching and flow control.Net branching and flow control
.Net branching and flow controlLearnNowOnline
 
WPF: Working with Data
WPF: Working with DataWPF: Working with Data
WPF: Working with DataLearnNowOnline
 
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...Amazon Web Services
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...Amazon Web Services
 
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...Amazon Web Services
 
New in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDENew in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDELearnNowOnline
 
.NET Variables and Data Types
.NET Variables and Data Types.NET Variables and Data Types
.NET Variables and Data TypesLearnNowOnline
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsAmazon Web Services
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesAmazon Web Services
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...Amazon Web Services
 

Similar to Using .NET Framework classes for file IO, strings, dates and random numbers (20)

Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
 
Getting Started with .NET
Getting Started with .NETGetting Started with .NET
Getting Started with .NET
 
Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5
 
SQL Server: Security
SQL Server: SecuritySQL Server: Security
SQL Server: Security
 
What's new in Silverlight 5
What's new in Silverlight 5What's new in Silverlight 5
What's new in Silverlight 5
 
Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...
Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...
Remove Undifferentiated Heavy Lifting from Jenkins (DEV201-R1) - AWS re:Inven...
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity Framework
 
DevOps Spain 2019. Pedro Mendoza-AWS
DevOps Spain 2019. Pedro Mendoza-AWSDevOps Spain 2019. Pedro Mendoza-AWS
DevOps Spain 2019. Pedro Mendoza-AWS
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
.Net branching and flow control
.Net branching and flow control.Net branching and flow control
.Net branching and flow control
 
WPF: Working with Data
WPF: Working with DataWPF: Working with Data
WPF: Working with Data
 
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
Workshop: AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Pract...
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
 
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
 
New in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDENew in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDE
 
.NET Variables and Data Types
.NET Variables and Data Types.NET Variables and Data Types
.NET Variables and Data Types
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
 

More from LearnNowOnline

Windows 8: Shapes and Geometries
Windows 8: Shapes and GeometriesWindows 8: Shapes and Geometries
Windows 8: Shapes and GeometriesLearnNowOnline
 
SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionLearnNowOnline
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingLearnNowOnline
 
Object oriented techniques
Object oriented techniquesObject oriented techniques
Object oriented techniquesLearnNowOnline
 
SharePoint Document Management
SharePoint Document ManagementSharePoint Document Management
SharePoint Document ManagementLearnNowOnline
 
SharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathSharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathLearnNowOnline
 
Sql 2012 development and programming
Sql 2012  development and programmingSql 2012  development and programming
Sql 2012 development and programmingLearnNowOnline
 
KnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCKnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCLearnNowOnline
 
Expression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignExpression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignLearnNowOnline
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCLearnNowOnline
 
Working with Controllers and Actions in MVC
Working with Controllers and Actions in MVCWorking with Controllers and Actions in MVC
Working with Controllers and Actions in MVCLearnNowOnline
 
Creating a User Interface
Creating a User InterfaceCreating a User Interface
Creating a User InterfaceLearnNowOnline
 

More from LearnNowOnline (14)

Windows 8: Shapes and Geometries
Windows 8: Shapes and GeometriesWindows 8: Shapes and Geometries
Windows 8: Shapes and Geometries
 
SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data Protection
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
 
A tour of SQL Server
A tour of SQL ServerA tour of SQL Server
A tour of SQL Server
 
Generics
GenericsGenerics
Generics
 
Object oriented techniques
Object oriented techniquesObject oriented techniques
Object oriented techniques
 
SharePoint Document Management
SharePoint Document ManagementSharePoint Document Management
SharePoint Document Management
 
SharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathSharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPath
 
Sql 2012 development and programming
Sql 2012  development and programmingSql 2012  development and programming
Sql 2012 development and programming
 
KnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCKnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVC
 
Expression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignExpression Blend Motion & Interaction Design
Expression Blend Motion & Interaction Design
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Working with Controllers and Actions in MVC
Working with Controllers and Actions in MVCWorking with Controllers and Actions in MVC
Working with Controllers and Actions in MVC
 
Creating a User Interface
Creating a User InterfaceCreating a User Interface
Creating a User Interface
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Using .NET Framework classes for file IO, strings, dates and random numbers

  • 1. Using the .NET Framework Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 2. Objectives Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 3. Objectives • Review using .NET Framework classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 4. Objectives • Review using .NET Framework classes • Explore basic file IO operations Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 5. Objectives • Review using .NET Framework classes • Explore basic file IO operations • Learn how to work with strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 6. Objectives • Review using .NET Framework classes • Explore basic file IO operations • Learn how to work with strings • See how to work with dates and times Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 7. .NET Framework Base Class Library Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 8. .NET Framework Base Class Library • BCL consists of classes that provide base functionality for .NET Framework Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 9. .NET Framework Base Class Library • BCL consists of classes that provide base functionality for .NET Framework  Many classes that make your life as a developer easier Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 10. .NET Framework Base Class Library • BCL consists of classes that provide base functionality for .NET Framework  Many classes that make your life as a developer easier  Library of classes used by all .NET applications Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 11. .NET Framework Base Class Library • BCL consists of classes that provide base functionality for .NET Framework  Many classes that make your life as a developer easier  Library of classes used by all .NET applications • Contains large number of classes (blocks of functionality, including properties, methods, and events) Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 12. .NET Framework Base Class Library • BCL consists of classes that provide base functionality for .NET Framework  Many classes that make your life as a developer easier  Library of classes used by all .NET applications • Contains large number of classes (blocks of functionality, including properties, methods, and events) • Namespaces group classes into common blocks of functionality Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 13. Some BCL Namespaces Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 14. Some BCL Namespaces • System Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 15. Some BCL Namespaces • System • System.Data Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 16. Some BCL Namespaces • System • System.Data • System.Diagnostics Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 17. Some BCL Namespaces • System • System.Data • System.Diagnostics • System.Globalization Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 18. Some BCL Namespaces • System • System.Data • System.Diagnostics • System.Globalization • System.IO Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 19. Some BCL Namespaces • System • System.Data • System.Diagnostics • System.Globalization • System.IO • System.Text Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 20. Some BCL Namespaces • System • System.Data • System.Diagnostics • System.Globalization • System.IO • System.Text • System.Text.RegularExpressions Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 21. Some BCL Namespaces • System • System.Data • System.Diagnostics • System.Globalization • System.IO • System.Text • System.Text.RegularExpressions • System.Web Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 22. Some BCL Namespaces • System • System.Data • System.Diagnostics • System.Globalization • System.IO • System.Text • System.Text.RegularExpressions • System.Web • System.Windows.Forms Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 23. Using .NET Framework Classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 24. Using .NET Framework Classes • Code you write in applications will be a mix of code that is specific to a language and code that uses .NET Framework classes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 25. Using .NET Framework Classes • Code you write in applications will be a mix of code that is specific to a language and code that uses .NET Framework classes Dim amount As Decimal = 45.61D Dim dollars, cents As Decimal dollars = Decimal.Truncate(amount) cents = amount - dollars Console.WriteLine( _ "The restaurant bill is {0:C}", _ amount) Console.WriteLine( _ "You pay the {0:C} and " & _ "I'll pay the {1:C}", _ dollars, cents) Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 26. Using .NET Framework Classes • Code you write in applications will be a mix of code that is specific to a language and code that uses .NET Framework classes Dim amount As Decimal = 45.61D decimal amount = 45.61M; Dim dollars, cents As Decimal decimal dollars, cents; dollars = Decimal.Truncate(amount) dollars = decimal.Truncate(amount); cents = amount - dollars cents = amount - collars; Console.WriteLine( _ Console.WriteLine( "The restaurant bill is {0:C}", _ "The restaurant bill is {0:C}", amount) amount); Console.WriteLine( _ Console.WriteLine( "You pay the {0:C} and " & _ "You pay the {0:C} and " + "I'll pay the {1:C}", _ "I'll pay the {1:C}", dollars, cents) dollars, cents); Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 27. Generating Random Numbers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 28. Generating Random Numbers • Use Random class to generate a series of random numbers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 29. Generating Random Numbers • Use Random class to generate a series of random numbers  Generated random numbers start with seed value Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 30. Generating Random Numbers • Use Random class to generate a series of random numbers  Generated random numbers start with seed value  Specify seed value or use default seed value Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 31. Generating Random Numbers • Use Random class to generate a series of random numbers  Generated random numbers start with seed value  Specify seed value or use default seed value • Next generates the next random number in a sequence Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 32. Getting Information about the Computer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 33. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 34. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running • Properties Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 35. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running • Properties  MachineName returns name of computer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 36. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running • Properties  MachineName returns name of computer  UserName returns name of user Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 37. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running • Properties  MachineName returns name of computer  UserName returns name of user  OSVersion returns operating system name and version Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 38. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running • Properties  MachineName returns name of computer  UserName returns name of user  OSVersion returns operating system name and version  CurrentDirectory returns program’s directory at runtime Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 39. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running • Properties  MachineName returns name of computer  UserName returns name of user  OSVersion returns operating system name and version  CurrentDirectory returns program’s directory at runtime  Version returns version of the CLR Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 40. Getting Information about the Computer • Environment class provides information on the computer and the environment in which the computer is running • Properties  MachineName returns name of computer  UserName returns name of user  OSVersion returns operating system name and version  CurrentDirectory returns program’s directory at runtime  Version returns version of the CLR • Use GetFolderPath and SpecialFolder enumeration to refer to My Documents, desktop, etc. Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 41. Working with XML Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 42. Working with XML • System.Xml namespace contains classes that support reading and writing XML Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 43. Working with XML • System.Xml namespace contains classes that support reading and writing XML • Quick review of XML Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 44. Working with XML • System.Xml namespace contains classes that support reading and writing XML • Quick review of XML  XML documents are based on elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 45. Working with XML • System.Xml namespace contains classes that support reading and writing XML • Quick review of XML  XML documents are based on elements  Element comprised of start tag, content, and end tag Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 46. Working with XML • System.Xml namespace contains classes that support reading and writing XML • Quick review of XML  XML documents are based on elements  Element comprised of start tag, content, and end tag  Elements can contain other elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 47. Working with XML • System.Xml namespace contains classes that support reading and writing XML • Quick review of XML  XML documents are based on elements  Element comprised of start tag, content, and end tag  Elements can contain other elements  Attributes contain information about elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 48. Working with XML • System.Xml namespace contains classes that support reading and writing XML • Quick review of XML  XML documents are based on elements  Element comprised of start tag, content, and end tag  Elements can contain other elements  Attributes contain information about elements <chapters total = "2"> <chapter>Variables and Data Types</chapter> <chapter>Using the .NET Framework</chapter> </chapters> Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 49. Writing XML Files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 50. Writing XML Files • Use XmlWriter class to write XML to file or in memory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 51. Writing XML Files • Use XmlWriter class to write XML to file or in memory  Use Create to create a new instance and pass the name of an XML file as a parameter Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 52. Writing XML Files • Use XmlWriter class to write XML to file or in memory  Use Create to create a new instance and pass the name of an XML file as a parameter • Use XmlWriterSettings class to control how XML is written Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 53. Writing XML Files • Use XmlWriter class to write XML to file or in memory  Use Create to create a new instance and pass the name of an XML file as a parameter • Use XmlWriterSettings class to control how XML is written  Indent specifies that elements should be indented Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 54. Writing XML Files • Use XmlWriter class to write XML to file or in memory  Use Create to create a new instance and pass the name of an XML file as a parameter • Use XmlWriterSettings class to control how XML is written  Indent specifies that elements should be indented  IndentChars specifies the character to use Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 55. Writing XML Files • Use XmlWriter class to write XML to file or in memory  Use Create to create a new instance and pass the name of an XML file as a parameter • Use XmlWriterSettings class to control how XML is written  Indent specifies that elements should be indented  IndentChars specifies the character to use  NewLineChars specifies the character for line breaks Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 56. Writing XML Files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 57. Writing XML Files • WriteStartDocument writes XML declaration Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 58. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 59. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 60. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag <chapters> Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 61. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag <chapters> • WriteEndElement adds a closing tag Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 62. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag <chapters> • WriteEndElement adds a closing tag </chapters> Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 63. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag <chapters> • WriteEndElement adds a closing tag </chapters> • WriteAttributeString writes an attribute and its value Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 64. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag <chapters> • WriteEndElement adds a closing tag </chapters> • WriteAttributeString writes an attribute and its value <chapters total = "2“> Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 65. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag <chapters> • WriteEndElement adds a closing tag </chapters> • WriteAttributeString writes an attribute and its value <chapters total = "2“> • WriteElement adds an element and its value Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 66. Writing XML Files • WriteStartDocument writes XML declaration <?xml version="1.0" encoding="utf-8" standalone="yes"?> • WriteStartElement adds an XML tag <chapters> • WriteEndElement adds a closing tag </chapters> • WriteAttributeString writes an attribute and its value <chapters total = "2“> • WriteElement adds an element and its value <chapter>Using the .NET Framework</chapter> Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 67. Reading XML Files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 68. Reading XML Files • Use XmlReader class to read XML from file or from memory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 69. Reading XML Files • Use XmlReader class to read XML from file or from memory  Use Create to create a new instance and pass name of XML file as parameter Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 70. Reading XML Files • Use XmlReader class to read XML from file or from memory  Use Create to create a new instance and pass name of XML file as parameter • Read reads each node in the XML one at a time Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 71. Reading XML Files • Use XmlReader class to read XML from file or from memory  Use Create to create a new instance and pass name of XML file as parameter • Read reads each node in the XML one at a time  Use NodeType to determine if a node is an element or text, etc. Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 72. Reading XML Files • Use XmlReader class to read XML from file or from memory  Use Create to create a new instance and pass name of XML file as parameter • Read reads each node in the XML one at a time  Use NodeType to determine if a node is an element or text, etc. • ReadToFollowing reads through XML until it finds the next element with a specified name Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 73. Reading XML Files • Use XmlReader class to read XML from file or from memory  Use Create to create a new instance and pass name of XML file as parameter • Read reads each node in the XML one at a time  Use NodeType to determine if a node is an element or text, etc. • ReadToFollowing reads through XML until it finds the next element with a specified name • ReadInnerXml reads the content of an Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 74. File Input/Output Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 75. File Input/Output • System.IO namespace contains classes for writing to and reading from files and for managing drives, directories, and files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 76. Writing to and Reading from Files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 77. Writing to and Reading from Files • StreamWriter class creates and writes to file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 78. Writing to and Reading from Files • StreamWriter class creates and writes to file  Write adds text to file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 79. Writing to and Reading from Files • StreamWriter class creates and writes to file  Write adds text to file  WriteLine adds text and line break to file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 80. Writing to and Reading from Files • StreamWriter class creates and writes to file  Write adds text to file  WriteLine adds text and line break to file • StreamReader class reads from file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 81. Writing to and Reading from Files • StreamWriter class creates and writes to file  Write adds text to file  WriteLine adds text and line break to file • StreamReader class reads from file  Read reads text from file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 82. Writing to and Reading from Files • StreamWriter class creates and writes to file  Write adds text to file  WriteLine adds text and line break to file • StreamReader class reads from file  Read reads text from file  ReadLine reads lines of text from file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 83. Managing Files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 84. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 85. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files • Exists returns true if file exists Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 86. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files • Exists returns true if file exists • Create creates a file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 87. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files • Exists returns true if file exists • Create creates a file  Returns an instance of FileStream class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 88. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files • Exists returns true if file exists • Create creates a file  Returns an instance of FileStream class o Use AppendText to add text to a file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 89. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files • Exists returns true if file exists • Create creates a file  Returns an instance of FileStream class o Use AppendText to add text to a file o Use CreateText to add text after removing existing text Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 90. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files • Exists returns true if file exists • Create creates a file  Returns an instance of FileStream class o Use AppendText to add text to a file o Use CreateText to add text after removing existing text o Both of these return an instance of StreamWriter class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 91. Managing Files • FileInfo class contains methods for copying, moving, renaming, creating, opening, deleting, and appending to files • Exists returns true if file exists • Create creates a file  Returns an instance of FileStream class o Use AppendText to add text to a file o Use CreateText to add text after removing existing text o Both of these return an instance of StreamWriter class • Use Write and WriteLine to write text to a file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 92. Managing Files Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 93. Managing Files • FileInfo properties to retrieve file information Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 94. Managing Files • FileInfo properties to retrieve file information  Name returns file name Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 95. Managing Files • FileInfo properties to retrieve file information  Name returns file name  FullName returns full path including file name Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 96. Managing Files • FileInfo properties to retrieve file information  Name returns file name  FullName returns full path including file name  Length returns file size Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 97. Managing Files • FileInfo properties to retrieve file information  Name returns file name  FullName returns full path including file name  Length returns file size  IsReadOnly returns true if file is read-only Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 98. Managing Files • FileInfo properties to retrieve file information  Name returns file name  FullName returns full path including file name  Length returns file size  IsReadOnly returns true if file is read-only  CreationTime returns when file was created Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 99. Managing Files • FileInfo properties to retrieve file information  Name returns file name  FullName returns full path including file name  Length returns file size  IsReadOnly returns true if file is read-only  CreationTime returns when file was created  LastAccessTime returns when file was last accessed Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 100. Managing Files • FileInfo properties to retrieve file information  Name returns file name  FullName returns full path including file name  Length returns file size  IsReadOnly returns true if file is read-only  CreationTime returns when file was created  LastAccessTime returns when file was last accessed • CopyTo copies a file Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 101. Managing Directories Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 102. Managing Directories • DirectoryInfo class contains methods for creating, moving, and deleting directories, as well as getting a list of files in the directory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 103. Managing Directories • DirectoryInfo class contains methods for creating, moving, and deleting directories, as well as getting a list of files in the directory • Exists returns true if a directory exists Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 104. Managing Directories • DirectoryInfo class contains methods for creating, moving, and deleting directories, as well as getting a list of files in the directory • Exists returns true if a directory exists • Create creates a directory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 105. Managing Directories • DirectoryInfo class contains methods for creating, moving, and deleting directories, as well as getting a list of files in the directory • Exists returns true if a directory exists • Create creates a directory • Delete removes a directory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 106. Managing Directories • DirectoryInfo class contains methods for creating, moving, and deleting directories, as well as getting a list of files in the directory • Exists returns true if a directory exists • Create creates a directory • Delete removes a directory • Name returns the name of a directory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 107. Managing Directories • DirectoryInfo class contains methods for creating, moving, and deleting directories, as well as getting a list of files in the directory • Exists returns true if a directory exists • Create creates a directory • Delete removes a directory • Name returns the name of a directory • FullName returns the full path and name of a directory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 108. Getting Information from Drives Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 109. Getting Information from Drives • DriveInfo class returns information from a drive Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 110. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 111. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 112. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information  Name returns drive name Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 113. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information  Name returns drive name  DriveType returns drive type, e.g., Fixed, Network, CDRom Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 114. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information  Name returns drive name  DriveType returns drive type, e.g., Fixed, Network, CDRom  DriveFormat returns file system name, e.g., NTFS or FAT32 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 115. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information  Name returns drive name  DriveType returns drive type, e.g., Fixed, Network, CDRom  DriveFormat returns file system name, e.g., NTFS or FAT32  VolumeLabel returns volume label Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 116. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information  Name returns drive name  DriveType returns drive type, e.g., Fixed, Network, CDRom  DriveFormat returns file system name, e.g., NTFS or FAT32  VolumeLabel returns volume label  IsReady returns true if drive is ready for read or read/write operations Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 117. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information  Name returns drive name  DriveType returns drive type, e.g., Fixed, Network, CDRom  DriveFormat returns file system name, e.g., NTFS or FAT32  VolumeLabel returns volume label  IsReady returns true if drive is ready for read or read/write operations  TotalSize returns total storage capacity Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 118. Getting Information from Drives • DriveInfo class returns information from a drive • GetDrives returns a list of all drives on a computer • Properties to view drive information  Name returns drive name  DriveType returns drive type, e.g., Fixed, Network, CDRom  DriveFormat returns file system name, e.g., NTFS or FAT32  VolumeLabel returns volume label  IsReady returns true if drive is ready for read or read/write operations  TotalSize returns total storage capacity  TotalFreeSpace returns total amount of free space available Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 119. Working with Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 120. Working with Strings • Wide variety of tasks you might want to accomplish when working with strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 121. Working with Strings • Wide variety of tasks you might want to accomplish when working with strings  Separate out first and last name from string representing someone’s full name Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 122. Working with Strings • Wide variety of tasks you might want to accomplish when working with strings  Separate out first and last name from string representing someone’s full name  Convert string to all uppercase Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 123. Working with Strings • Wide variety of tasks you might want to accomplish when working with strings  Separate out first and last name from string representing someone’s full name  Convert string to all uppercase  Concatenate two strings representing a first and last name and create a string containing a last name, followed by a comma, followed by a first name Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 124. Working with Strings • Wide variety of tasks you might want to accomplish when working with strings  Separate out first and last name from string representing someone’s full name  Convert string to all uppercase  Concatenate two strings representing a first and last name and create a string containing a last name, followed by a comma, followed by a first name  Display a number in currency format, for example $9,999.99 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 125. String Class Fields and Properties Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 126. String Class Fields and Properties • Empty represents an empty string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 127. String Class Fields and Properties • Empty represents an empty string • Length returns the number of characters Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 128. String Class Fields and Properties • Empty represents an empty string • Length returns the number of characters • Chars returns a character at a position in a string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 129. String Class Methods Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 130. String Class Methods • String class includes methods for a variety of tasks Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 131. String Class Methods • String class includes methods for a variety of tasks  Comparing two strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 132. String Class Methods • String class includes methods for a variety of tasks  Comparing two strings  Searching for a string in another string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 133. String Class Methods • String class includes methods for a variety of tasks  Comparing two strings  Searching for a string in another string  Modifying all or some of a string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 134. String Class Methods • String class includes methods for a variety of tasks  Comparing two strings  Searching for a string in another string  Modifying all or some of a string  Extracting part of a string from a string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 135. String Class Methods • String class includes methods for a variety of tasks  Comparing two strings  Searching for a string in another string  Modifying all or some of a string  Extracting part of a string from a string  Formatting the display of a string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 136. Comparing Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 137. Comparing Strings • Compare takes as parameters two strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 138. Comparing Strings • Compare takes as parameters two strings  Returns negative number if the first string is less than the second, 0 if they are equal, and a positive number if the first string is greater than the second Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 139. Comparing Strings • Compare takes as parameters two strings  Returns negative number if the first string is less than the second, 0 if they are equal, and a positive number if the first string is greater than the second • Equals takes as parameters two strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 140. Comparing Strings • Compare takes as parameters two strings  Returns negative number if the first string is less than the second, 0 if they are equal, and a positive number if the first string is greater than the second • Equals takes as parameters two strings  Returns true if two strings are equal Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 141. Comparing Strings • Compare takes as parameters two strings  Returns negative number if the first string is less than the second, 0 if they are equal, and a positive number if the first string is greater than the second • Equals takes as parameters two strings  Returns true if two strings are equal • CompareTo method of a string takes as parameter a string to compare Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 142. Comparing Strings • Compare takes as parameters two strings  Returns negative number if the first string is less than the second, 0 if they are equal, and a positive number if the first string is greater than the second • Equals takes as parameters two strings  Returns true if two strings are equal • CompareTo method of a string takes as parameter a string to compare  Returns a negative number if the first string is less than second, 0 if they are equal, and a positive Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 143. Searching in Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 144. Searching in Strings • StartsWith, EndsWith, Contains and IndexOf all test for the existence of one string within another string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 145. Searching in Strings • StartsWith, EndsWith, Contains and IndexOf all test for the existence of one string within another string  All are methods of the first string and take the second string as the parameter Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 146. Searching in Strings • StartsWith, EndsWith, Contains and IndexOf all test for the existence of one string within another string  All are methods of the first string and take the second string as the parameter  StartsWith, EndsWith, and Contains return true if the second string is found in the first string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 147. Searching in Strings • StartsWith, EndsWith, Contains and IndexOf all test for the existence of one string within another string  All are methods of the first string and take the second string as the parameter  StartsWith, EndsWith, and Contains return true if the second string is found in the first string  IndexOf returns an integer representing the starting point of the second string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 148. Modifying Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 149. Modifying Strings • Insert adds a string at a specified position Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 150. Modifying Strings • Insert adds a string at a specified position • Remove removes all characters between two positions Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 151. Modifying Strings • Insert adds a string at a specified position • Remove removes all characters between two positions  Specify the start position to remove all characters from the start to the end of a string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 152. Modifying Strings • Insert adds a string at a specified position • Remove removes all characters between two positions  Specify the start position to remove all characters from the start to the end of a string  Specify the start and end position to remove all characters from the start through the end position Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 153. Modifying Strings • Insert adds a string at a specified position • Remove removes all characters between two positions  Specify the start position to remove all characters from the start to the end of a string  Specify the start and end position to remove all characters from the start through the end position • Replace replaces part of a string with another string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 154. Modifying Strings • Insert adds a string at a specified position • Remove removes all characters between two positions  Specify the start position to remove all characters from the start to the end of a string  Specify the start and end position to remove all characters from the start through the end position • Replace replaces part of a string with another string  Replace a character with another character Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 155. Modifying Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 156. Modifying Strings • Trim eliminates white space from beginning and end Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 157. Modifying Strings • Trim eliminates white space from beginning and end • TrimStart eliminates white space from beginning Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 158. Modifying Strings • Trim eliminates white space from beginning and end • TrimStart eliminates white space from beginning • TrimEnd eliminates white space from end Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 159. Modifying Strings • Trim eliminates white space from beginning and end • TrimStart eliminates white space from beginning • TrimEnd eliminates white space from end • PadLeft adds white space or character to beginning Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 160. Modifying Strings • Trim eliminates white space from beginning and end • TrimStart eliminates white space from beginning • TrimEnd eliminates white space from end • PadLeft adds white space or character to beginning • PadRight adds white space or character to end Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 161. Modifying Strings • Trim eliminates white space from beginning and end • TrimStart eliminates white space from beginning • TrimEnd eliminates white space from end • PadLeft adds white space or character to beginning • PadRight adds white space or character to end • ToUpper converts string to uppercase Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 162. Extracting Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 163. Extracting Strings • Substring retrieves part of a string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 164. Extracting Strings • Substring retrieves part of a string  First parameter specifies position representing start of string you want to retrieve Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 165. Extracting Strings • Substring retrieves part of a string  First parameter specifies position representing start of string you want to retrieve  Optional second parameter specifies length of string you want to retrieve Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 166. Extracting Strings • Substring retrieves part of a string  First parameter specifies position representing start of string you want to retrieve  Optional second parameter specifies length of string you want to retrieve • Split retrieves multiple parts of a string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 167. Extracting Strings • Substring retrieves part of a string  First parameter specifies position representing start of string you want to retrieve  Optional second parameter specifies length of string you want to retrieve • Split retrieves multiple parts of a string  Takes as parameter an array containing characters used as delimiters, or separators (e.g. , or | or tab) Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 168. Extracting Strings • Substring retrieves part of a string  First parameter specifies position representing start of string you want to retrieve  Optional second parameter specifies length of string you want to retrieve • Split retrieves multiple parts of a string  Takes as parameter an array containing characters used as delimiters, or separators (e.g. , or | or tab)  Returns an array containing parts of the string separated by characters listed in an array Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 169. Formatting Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 170. Formatting Strings • Use format specifiers to control how a string is displayed Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 171. Formatting Strings • Use format specifiers to control how a string is displayed • Formatting numbers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 172. Formatting Strings • Use format specifiers to control how a string is displayed • Formatting numbers  C or c displays as currency: $121,246,424.00 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 173. Formatting Strings • Use format specifiers to control how a string is displayed • Formatting numbers  C or c displays as currency: $121,246,424.00  D or d displays a string as a decimal: 121246424 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 174. Formatting Strings • Use format specifiers to control how a string is displayed • Formatting numbers  C or c displays as currency: $121,246,424.00  D or d displays a string as a decimal: 121246424  E or e displays in scientific (exponential) form: 1.212464E+008 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 175. Formatting Strings • Use format specifiers to control how a string is displayed • Formatting numbers  C or c displays as currency: $121,246,424.00  D or d displays a string as a decimal: 121246424  E or e displays in scientific (exponential) form: 1.212464E+008  F or f displays as a fixed-point number: 121246424.00 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 176. Formatting Strings • Use format specifiers to control how a string is displayed • Formatting numbers  C or c displays as currency: $121,246,424.00  D or d displays a string as a decimal: 121246424  E or e displays in scientific (exponential) form: 1.212464E+008  F or f displays as a fixed-point number: 121246424.00  G or g displays in general format: 121246424 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 177. Formatting Strings • Use format specifiers to control how a string is displayed • Formatting numbers  C or c displays as currency: $121,246,424.00  D or d displays a string as a decimal: 121246424  E or e displays in scientific (exponential) form: 1.212464E+008  F or f displays as a fixed-point number: 121246424.00  G or g displays in general format: 121246424  N or n displays as a number: 121,246,424.00 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 178. Formatting Strings Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 179. Formatting Strings • Formatting dates Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 180. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 181. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100  D displays in long date pattern: Friday, January 01, 2100 Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 182. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100  D displays in long date pattern: Friday, January 01, 2100  t displays in short time pattern: 12:00 AM Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 183. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100  D displays in long date pattern: Friday, January 01, 2100  t displays in short time pattern: 12:00 AM  T displays in long time pattern: 12:00:00 AM Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 184. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100  D displays in long date pattern: Friday, January 01, 2100  t displays in short time pattern: 12:00 AM  T displays in long time pattern: 12:00:00 AM  f displays in full date/time pattern (short time): Friday, January 01, 2100 12:00 AM Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 185. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100  D displays in long date pattern: Friday, January 01, 2100  t displays in short time pattern: 12:00 AM  T displays in long time pattern: 12:00:00 AM  f displays in full date/time pattern (short time): Friday, January 01, 2100 12:00 AM  F displays in full date/time pattern (long time): Friday, January 01, 2100 12:00:00 AM Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 186. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100  D displays in long date pattern: Friday, January 01, 2100  t displays in short time pattern: 12:00 AM  T displays in long time pattern: 12:00:00 AM  f displays in full date/time pattern (short time): Friday, January 01, 2100 12:00 AM  F displays in full date/time pattern (long time): Friday, January 01, 2100 12:00:00 AM  g displays in general date/time pattern (short time): 1/1/2100 12:00 AM Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 187. Formatting Strings • Formatting dates  d displays in short date pattern: 1/1/2100  D displays in long date pattern: Friday, January 01, 2100  t displays in short time pattern: 12:00 AM  T displays in long time pattern: 12:00:00 AM  f displays in full date/time pattern (short time): Friday, January 01, 2100 12:00 AM  F displays in full date/time pattern (long time): Friday, January 01, 2100 12:00:00 AM  g displays in general date/time pattern (short time): 1/1/2100 12:00 AM  G displays in general date/time pattern (long time): 1/1/2100 12:00:00 AM Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 188. Using the StringBuilder Class Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 189. Using the StringBuilder Class • Strings are immutable so each time you use a string operator a new string is created Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 190. Using the StringBuilder Class • Strings are immutable so each time you use a string operator a new string is created • StringBuilder is more efficient and represents one string in memory Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 191. Using the StringBuilder Class • Strings are immutable so each time you use a string operator a new string is created • StringBuilder is more efficient and represents one string in memory • Append adds a string to the end of an existing string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 192. Using the StringBuilder Class • Strings are immutable so each time you use a string operator a new string is created • StringBuilder is more efficient and represents one string in memory • Append adds a string to the end of an existing string • AppendLine adds a string followed by a line break to an existing string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 193. Using the StringBuilder Class • Strings are immutable so each time you use a string operator a new string is created • StringBuilder is more efficient and represents one string in memory • Append adds a string to the end of an existing string • AppendLine adds a string followed by a line break to an existing string • Insert adds a string to an existing string at a specific position Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 194. Using the StringBuilder Class • Strings are immutable so each time you use a string operator a new string is created • StringBuilder is more efficient and represents one string in memory • Append adds a string to the end of an existing string • AppendLine adds a string followed by a line break to an existing string • Insert adds a string to an existing string at a specific position • Replace replaces all occurrences of one string with another string Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 195. Working with Dates and Times Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 196. Working with Dates and Times • Dates and times are represented by DateTime structure Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 197. Working with Dates and Times • Dates and times are represented by DateTime structure • Date and time intervals are represented by TimeSpan structure Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 198. DateTime Structure Properties Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 199. DateTime Structure Properties • Today returns current date Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 200. DateTime Structure Properties • Today returns current date • Now returns current date and time Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 201. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 202. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 203. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 204. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 205. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day  Year Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 206. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day  Year  DayOfWeek Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 207. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day  Year  DayOfWeek  DayOfYear Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 208. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day  Year  DayOfWeek  DayOfYear  TimeOfDay Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 209. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day  Year  DayOfWeek  DayOfYear  TimeOfDay  Hour Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 210. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day  Year  DayOfWeek  DayOfYear  TimeOfDay  Hour  Minute Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 211. DateTime Structure Properties • Today returns current date • Now returns current date and time • To determine the components of date or time use  Date  Month  Day  Year  DayOfWeek  DayOfYear  TimeOfDay  Hour  Minute  Second Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 212. DateTime Structure Methods Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 213. DateTime Structure Methods • To convert DateTime variable to string use Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 214. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 215. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 216. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 217. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 218. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format • To find date in future or past use Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 219. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format • To find date in future or past use  AddDays Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 220. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format • To find date in future or past use  AddDays  AddMonths Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 221. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format • To find date in future or past use  AddDays  AddMonths  AddYears Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 222. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format • To find date in future or past use  AddDays  AddMonths  AddYears  AddHours Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 223. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format • To find date in future or past use  AddDays  AddMonths  AddYears  AddHours  AddMinutes Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 224. DateTime Structure Methods • To convert DateTime variable to string use  ToLongDateString, displays date in long format  ToLongTimeString, displays time in long format  ToShortDateString, displays date in short format  ToShortTimeString, displays time in short format • To find date in future or past use  AddDays  AddMonths  AddYears  AddHours  AddMinutes  AddSeconds Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 225. Using the TimeSpan Structure Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 226. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 227. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 228. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 229. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 230. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval  Minutes - # of whole minutes in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 231. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval  Minutes - # of whole minutes in interval  Seconds - # of whole seconds in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 232. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval  Minutes - # of whole minutes in interval  Seconds - # of whole seconds in interval  Milliseconds - # of whole milliseconds in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 233. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval  Minutes - # of whole minutes in interval  Seconds - # of whole seconds in interval  Milliseconds - # of whole milliseconds in interval  TotalDays - # of whole and fractional days in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 234. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval  Minutes - # of whole minutes in interval  Seconds - # of whole seconds in interval  Milliseconds - # of whole milliseconds in interval  TotalDays - # of whole and fractional days in interval  TotalHours - # of whole and fractional hours in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 235. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval  Minutes - # of whole minutes in interval  Seconds - # of whole seconds in interval  Milliseconds - # of whole milliseconds in interval  TotalDays - # of whole and fractional days in interval  TotalHours - # of whole and fractional hours in interval  TotalMinutes - # of whole and fractional minutes in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 236. Using the TimeSpan Structure • TimeSpan represents the duration of time measured in ticks (100 nanoseconds) • To determine the components of date or time use  Days - # of whole days in interval  Hours - # of whole hours in interval  Minutes - # of whole minutes in interval  Seconds - # of whole seconds in interval  Milliseconds - # of whole milliseconds in interval  TotalDays - # of whole and fractional days in interval  TotalHours - # of whole and fractional hours in interval  TotalMinutes - # of whole and fractional minutes in interval  TotalSeconds - # of whole and fractional seconds in interval Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 237. Learn More! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 238. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 239. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 240. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! • Learn more about .NET on SlideShare: Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 241. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! • Learn more about .NET on SlideShare: • Getting Started with .NET Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 242. Learn More! • This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! • Learn more about .NET on SlideShare: • Getting Started with .NET • .NET Variables and Data Types Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. \n
  133. \n
  134. \n
  135. \n
  136. \n
  137. \n
  138. \n
  139. \n
  140. \n
  141. \n
  142. \n
  143. \n
  144. \n
  145. \n
  146. \n
  147. \n
  148. \n
  149. \n
  150. \n
  151. \n
  152. \n
  153. \n
  154. \n
  155. \n
  156. \n
  157. \n
  158. \n
  159. \n
  160. \n
  161. \n
  162. \n
  163. \n
  164. \n
  165. \n
  166. \n
  167. \n
  168. \n
  169. \n
  170. \n
  171. \n
  172. \n
  173. \n
  174. \n
  175. \n
  176. \n
  177. \n
  178. \n
  179. \n
  180. \n
  181. \n
  182. \n
  183. \n
  184. \n
  185. \n
  186. \n
  187. \n
  188. \n
  189. \n
  190. \n
  191. \n
  192. \n
  193. \n
  194. \n
  195. \n
  196. \n
  197. \n
  198. \n
  199. \n
  200. \n
  201. \n
  202. \n
  203. \n
  204. \n
  205. \n
  206. \n
  207. \n
  208. \n
  209. \n
  210. \n
  211. \n
  212. \n
  213. \n
  214. \n
  215. DEMO: rest of section\n
  216. DEMO: rest of section\n
  217. DEMO: rest of section\n
  218. DEMO: rest of section\n
  219. DEMO: rest of section\n