== Creating Strings in C# ==
<google>ADSDAQBOX_FLOW</google>
Strings consist of sequences of characters contained in a string object. A string object may be created using a number of different mechanisms.
A string may be declared but not initialized as follows:
</pre>
String literals are placed with within double quotes (as shown above). If the string itself contains double quotes the escape character (\) should precede the double quote characters:
<pre>
System.Console.WriteLine ("He shouted \"Can you here hear me?\"");
</pre>
== Obtaining the Length of a C# String ==
The length of a C# string may be obtained by accessing the ''Length'' property of the string object:
<pre>
== Treating Strings as Arrays ==
It is possible to access individual characters in a string by treating the string as an array (for details on C# arrays read the chapter entitled [[Introducing C Sharp Arrays|Introducing C# Arrays]]).
By specifying the index into the array of the character , individual characters may be accessed. It is important to note that strings are immutable (in other words the value of a string cannot be modified unless an entirely new string literal is assigned to the object). This means that while it is possible to read the value of a character in a string it is not possible to change the value:
<pre>
</pre>
Exception encountered, of type "Error"
[d1b562c6] /index.php/Special:MobileDiff/7035 Error from line 434 of /home/techotopia/includes/diff/DairikiDiff.php: Call to undefined function each()
Backtrace:
#0 /home/techotopia/includes/diff/DairikiDiff.php(544): DiffEngine->diag()
#1 /home/techotopia/includes/diff/DairikiDiff.php(344): DiffEngine->compareSeq()
#2 /home/techotopia/includes/diff/DairikiDiff.php(227): DiffEngine->diffLocal()
#3 /home/techotopia/includes/diff/DairikiDiff.php(721): DiffEngine->diff()
#4 /home/techotopia/includes/diff/DairikiDiff.php(859): Diff->__construct()
#5 /home/techotopia/includes/diff/DairikiDiff.php(980): MappedDiff->__construct()
#6 /home/techotopia/extensions/MobileFrontend/includes/diff/InlineDiffFormatter.php(99): WordLevelDiff->__construct()
#7 /home/techotopia/includes/diff/DiffFormatter.php(140): InlineDiffFormatter->changed()
#8 /home/techotopia/includes/diff/DiffFormatter.php(82): DiffFormatter->block()
#9 /home/techotopia/extensions/MobileFrontend/includes/diff/InlineDifferenceEngine.php(117): DiffFormatter->format()
#10 /home/techotopia/includes/diff/DifferenceEngine.php(797): InlineDifferenceEngine->generateTextDiffBody()
#11 /home/techotopia/includes/diff/DifferenceEngine.php(728): DifferenceEngine->generateContentDiffBody()
#12 /home/techotopia/extensions/MobileFrontend/includes/specials/SpecialMobileDiff.php(241): DifferenceEngine->getDiffBody()
#13 /home/techotopia/extensions/MobileFrontend/includes/specials/SpecialMobileDiff.php(135): SpecialMobileDiff->showDiff()
#14 /home/techotopia/extensions/MobileFrontend/includes/specials/MobileSpecialPage.php(53): SpecialMobileDiff->executeWhenAvailable()
#15 /home/techotopia/includes/specialpage/SpecialPage.php(384): MobileSpecialPage->execute()
#16 /home/techotopia/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run()
#17 /home/techotopia/includes/MediaWiki.php(281): SpecialPageFactory::executePath()
#18 /home/techotopia/includes/MediaWiki.php(714): MediaWiki->performRequest()
#19 /home/techotopia/includes/MediaWiki.php(508): MediaWiki->main()
#20 /home/techotopia/index.php(41): MediaWiki->run()
#21 {main}