Here we will see how to use Exponential Notation in LightSwitch Visual Studio 2012.
Here we will see how to use Exponential Notation in LightSwitch Visual Studio 2012.If any of the Exponential Notation Format Specifiers are present in the string and are followed immediately by at least one zero, then the number is formatted using scientific notation with an "E" or "e" that is inserted between the number and the exponent. The multiple number of zeros following the scientific notation represent the minimum number of digits to output for the exponent. The "E+" and "e+" formats indicate that a plus sign or minus sign should always precede the exponent. The "E", "E-", "e", or "e-" formats indicate that a sign character should precede only negative exponents.Use the following procedure to create a sample showing how to use Exponential Notation on a Screen.Step 1Open the LightSwitch Application in Visual Studio 2012 and go to the Solution Explorer.Right-click on "Data Sources" and choose "Add Table".The table appears in the Table Designer window. Insert the records in the following table.Here in the table I had added a record named "Fees" and I provided its datatype as "Double".Step 2Select the "Fees" record from the table and go to the Property window and provide "E0" in the Format Pattern TextBox. The Format Pattern Property Window:Now once again go to the Solution Explorer, right-click on Screens and choose "Add Screen".
The Add New Screen dialog box appears. Select the "Editable Grid Screen" from the Screen Template; inside the screen information, choose "Student" under screen data and provide some name to the Screen and click the "OK" button.The Screen Designer appears as shown below.Step 3Press F5 to run the application. Provide the information. When we click on the "Save" button we get the following output as shown.Step 4Stop debugging the application. Once again go to the Format Pattern of Property window in the table designer. This time enter "E+0" in the format pattern of the Property window. Once again press F5 to run the application. This time we will get the following output.Step 5Stop debugging the application.Once again go to the Format Pattern of the Property window in the table designer. This time enter "E-0" in the format pattern of the Property window.Once again press F5 in order to run the application. This time we will get the following output.Step 6Now for the remaining steps we will see the "e" Custom Format Specifier.Stop debugging the application. Once again go to the Format Pattern of the Property window in the table designer. This time enter "e0" in the format pattern of the Property window. Once again press F5 to run the application. This time we will get the following output.Step 7Stop debugging the application. Once again go to the Format Pattern of the Property window in the table designer. This time enter "e+0" in the format pattern of the Property window. Once again press F5 to run the application. This time we will get the following output.Step 8Stop debugging the application. Once again go to the Format Pattern of Property window in the table designer. This time enter "e-0" in the format pattern of the Property window. Once again press F5 to run the application. This time we will get the following output.
Printing in C# Made Easy