Click here to Skip to main content
12,303,940 members (73,572 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


8 bookmarked

A C# Temperature Struct

, 6 Jan 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
A temperature struct in C#.

Microsoft loves using temperature in .NET examples. See here and here.

So, I decided to combine them all into a nice structure that implements IFormattable, IComparable, IEquatable, and etc., etc. That way, they don't have to keep rewriting it themselves.

The code also gives some good examples on operator overloading. Have fun.

using System;
using System.Globalization;

/// <span class="code-SummaryComment"><summary>


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionArithmetic operator overloads. Pin
supercat96-Jan-12 12:48
membersupercat96-Jan-12 12:48 
AnswerRe: Arithmetic operator overloads. Pin
qenn12-Jan-12 9:01
memberqenn12-Jan-12 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160530.1 | Last Updated 6 Jan 2012
Article Copyright 2012 by qenn
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid