Ad space (banner)
#๏ธโƒฃC# Lessons
Lesson 13 / 68

Using the Standard Library

In this lesson you will learn about handy features that ship with the C# standard library, so you know what you do not have to build yourself. This is for anyone searching for "C# standard library how to use".

Methods such as .ToUpper() and .PadLeft(), and collections such as List<T>, are used constantly in practice. .NET comes with a rich standard library.

The sample code shows "hello".ToUpper() converting to upper case, "7".PadLeft(3, '0') padding with zeros, and List<int> holding a variable-length list. Notice how .Count reads the number of elements.

A common stumbling block for beginners is not knowing what the standard library already provides, and writing the same logic out at length by hand. Knowing what exists dramatically changes how much you have to implement yourself.

In real-world development, having a working knowledge of the string and collection methods makes you noticeably faster at writing code.

๐Ÿ“– Reference code
โœ๏ธ Your code
Type your code, then press "Run"

๐Ÿงช This site can't compile or run C# directly, so it checks on the spot whether what you typed matches the reference code (scoring happens entirely in your browser โ€” nothing is sent anywhere).

Ad space (banner)
Ad space (in-article)