Progress Monitor for IdealProgrammer.com
Take Swift, Intelligent, Massive, Planned, Loving, Effective (S.I.M.P.L.E.) Action to Transform Self into Ideal
IdealAutomate is a Web-Based Code Generator for ASPX Forms
Free Version Saves Days of Programming »
Skip Repetitive Navigational Links
Home
News
Presenters
Register
Contact
Categories
Titles
Converter
Code Samples
C# ASP.NET
C# Console
HTML
JavaScript
SQL Server
VB ASP.NET
VB Console
Please login
C-Sharp Length Example Syntax - C# String Function - Sample Code
Description:
Illustrates the C# Syntax for Length.
Example Class Main:
using System; public class clsLength { public void Main() { //**************************************************************************************** // Example #1: Length // Returns the length of the string - including leading and trailing spaces //**************************************************************************************** Console.WriteLine("Example #1: Length "); string strLengthExample = " ABC "; // Return Uppercase Console.WriteLine(strLengthExample.Length); // returns 13 //write blank line to make output easier to read Console.WriteLine(); //Prevent console from closing before you press enter Console.ReadLine(); } }
Example Class Program:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CSharp_Syntax { class Program { static void Main(string[] args) { clsLength myLength = new clsLength(); myLength.Main(); } } }
Home
News
Presenters
Register
Contact
Categories
Titles
Converter
Code Samples
C# ASP.NET
C# Console
HTML
JavaScript
SQL Server
VB ASP.NET
VB Console