- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Represent exact representation of no time in C#
Use the TimeSpan.Zero to represent the exact representation of no time i.e −
00:00:00
Set an object for TimeSpan −
TimeSpan ts;
Now, the TimeSpan.Zero is used to display no time −
TimeSpan ts = TimeSpan.Zero;
Example
using System; using System.Linq; public class Demo { public static void Main() { TimeSpan ts = TimeSpan.Zero; Console.WriteLine(ts); } }
Output
00:00:00
Advertisements