Skip to content

CSharp Academy

Search

Recent Articles

  • C# – LINQ Average Examples
  • C# – LINQ Sum Examples
  • C# – How to check if an item exists in a list
  • C# – How to convert string to enum
  • C# – How to use enum
  • C# – How to initialize an array
  • C# – LINQ GroupBy Examples
  • C# – LINQ Join Examples
  • C# – How to generate random password
  • C# – How to generate random string

Category: How To

C# – How to check if string contains only digits

There are plenty of methods to achieve this but even though it’s simple task you need to specify requirements like:

  • are white spaces allowed?
  • how to treat empty string?
  • what’s the maximum length of the string?

In this article I want to describe 3 different ideas how to solve this problem.

Continue reading C# – How to check if string contains only digits
Posted on April 17, 2020April 11, 2022Categories How To

C# – How to generate Guid

.NET Framework provides built-in Guid structure which allows to generate unique identifier. Continue reading C# – How to generate Guid

Posted on July 21, 2019March 27, 2022Categories How To

Posts navigation

Previous page Page 1 Page 2
Proudly powered by WordPress