Skip to main content

Data Manipulation

  • Chapter
Visual Basic 2008 Recipes
  • 992 Accesses

Abstract

Most applications need to manipulate some form of data. The Microsoft .NET Framework provides many techniques that simplify or improve the efficiency of common data-manipulation tasks. The recipes in this chapter cover the following:

  • Manipulating the contents of strings efficiently to avoid the overhead of automatic string creation due to the immutability of strings (recipe 2-1)

  • Representing basic data types using different encoding schemes or as byte arrays to allow you to share data with external systems (recipes 2-2, 2-3, and 2-4)

  • Validating user input and manipulating string values using regular expressions (recipes 2-5 and 2-6)

  • Creating System.DateTime or System.DateTimeOffset objects from string values, such as those that a user might enter, and displaying them as formatted strings (recipe 2-7)

  • Mathematically manipulating DateTime or DateTimeOffset objects in order to compare dates or add/subtract periods of time from a date (recipe 2-8)

  • Converting dates and times across time zones (recipe 2-9)

  • Sorting the contents of an array or an ArrayList collection (recipe 2-10)

  • Copying the contents of a collection to an array (recipe 2-11)

  • Analyzing or manipulating the contents of an array (recipe 2-12)

  • Using the standard generic collection classes to instantiate a strongly typed collection (recipe 2-13)

  • Using generics to define your own general-purpose container or collection class that will be strongly typed when it is used (recipe 2-14)

  • Serializing object state and persisting it to a file (recipe 2-15)

  • Reading user input from the Windows console (recipe 2-16)

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 52.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Todd Herman, Allen Jones, Matthew MacDonald, Rakesh Rajan

About this chapter

Cite this chapter

(2008). Data Manipulation. In: Visual Basic 2008 Recipes. Apress. https://doi.org/10.1007/978-1-4302-0604-0_2

Download citation

Publish with us

Policies and ethics