Strings Articles

C# Strings – Getting Started with Strings

Working with strings is a very common task for most C# developers. The .NET Framework offers good variety of tools for working with strings, but care must be taken as there are several gotchas to trip up the beginner. The first thing to note about strings in .NET is that they are Reference Types. Reference […]

Read more

C# String manipulation, string constructors, string assignment, and the StringBuilder class

Why is string manipulation so important?Because, as programmers, we do so much of it. In fact, on some days, itseems that everything is string manipulation. If you know how toprogram with strings, you're a great way along the journey to becominga powerful programmer. Fortunately, C# provides facilities for workingwith and manipulating strings. In this tutorial […]

Read more

Generate unique strings and numbers in C#

The System.Guid is used whenever we need to generate a unique key, but it is very long. That's in many cases not an issue, but in a web scenario where it is part of the URL we need to use its string representation which is 36 characters long. It clutters up the URL and is just […]

Read more

C# Strings and Regular Expressions

3.0. Introduction It would be very rare to create an entireapplication without using a single string. Strings help make sense ofthe seemingly random jumble of binary data that applications use toaccomplish a task. They appear in all facets of application developmentfrom the smallest system utility to large enterprise services. Theirvalue is so apparent that more […]

Read more

C# String Type Object Peculiarities

Purpose The main purpose of this article is to exploresome common and uncommon issues regarding DotNet and C#. Among suchcommon things my first article is on string data type which isreference type but some developers don?t understand it?s behavior whencompare with others reference type. Problem Changing the value of an alias reflect the change in […]

Read more

Manipulating Strings The Way C/C++ Programmers Use To

I have been asked a lot lately, how come it'sso different in C# to play around with strings? How come we have to doso many manipulations. We used to do this using recursions. Whilerecursions are fine, they are a main source for flaws and glitches, andI don't think you have to use them. In this […]

Read more

XML String Building

How to build XML string with only changed rows/columns edit on user form? Formerly I've been working on three-tier applications on J2EE platform. All aplication logic was written in EJB and all the data was send as XML string from PowerBuilder clients. I was thinking how to implement such kind of solution in .NET through […]

Read more

String To A Byte Array

  preamble this simple function converts a string to a byte[] that is in compliant with the visual c++ 6.0 BSTR/WCHAR. why might you want to use it? well for a start, for data compatability with those all programs you laboured over. Another reason I use it is for eventlogging. The EventLog class has an […]

Read more

String extractors and manipulators in C# – Part IV

The "toupper" and "tolower" methods, in thefollowing class, are both similar except for the one line conversion ofthe 'int' type data member ucode, which represents the ASCII value ofthe character read from the string or keyboard, to lowercase oruppercase. After determining the length of the string passed to it,both the methods scan each character in […]

Read more

C# String Class

This program explores the 'String' class, with this you will be able to create the string using the constructors and explore all the methods in this class. Download stringclass.cs

Read more
  • Page 1 of 2
  • 1
  • 2
  • >