String Format Sample

Sample Overview

This sample demonstrates using a variety of string formatting codes. You are allowed to input experimental format strings; the result of applying a format string to sample text is sent to the console.

The sample also demonstrates:

Sample Source and Build Output Locations

The sample source is found in sscli\samples\howto\basedatatypes\stringformat. 

The source file is:

The build output location is %TARGETCOMPLUS%\samples\howto\basedatatypes\stringformat.  The output file is an executable assembly named stringformat.exe.

Building the Sample

All samples are built from the buildall script. 

You can also build all the samples by switching to the root of the sample directory, sscli\samples, and typing build -c.

You can build this specific sample by switching to the sample directory and typing build -c.

Running the Sample

These steps require that the Shared Source CLI (SSCLI) be already built and functional.

  1. Run env.bat or source the env.csh or env.sh script files depending on your platform.
  2. Switch to the %TARGETCOMPLUS%\samples\howto\basedatatypes\stringformat directory.
  3. Type the following command:

    clix stringformat.exe


Copyright (c) 2002 Microsoft Corporation. All rights reserved.