NO

Author Topic: Just Curious - What Is This Stuff???  (Read 5348 times)

PhilG57

  • Guest
Just Curious - What Is This Stuff???
« on: January 01, 2016, 03:54:56 PM »
I thought my computer might be running a little hot so I poked around on the web to find a utility which would display internal temperatures, fan speeds, and the like.  While online, I thought I'd look for something with source code to investigate just for fun.

I found the "OpenHardwareMonitor" site, downloaded the executable, and ran it on my machine - no notable problems.  When I unzipped the source code, I discovered the files had a suffix of "cs", not the expected ".c" or even ".cpp".  I've attached a sample and it looks like C++ code but I'm wondering if it is maybe C# ???.  Then why is it named ".cs" ???

Has anyone seen this stuff before?  Any idea of what language this is?

Happy New Year and Many Thanks again. 

Offline DMac

  • Member
  • *
  • Posts: 272
Re: Just Curious - What Is This Stuff???
« Reply #1 on: January 01, 2016, 06:43:14 PM »
.cs is the C# file extension.  C# is the Dot Net C syntax object oriented programming language that Microsoft developed as an alternative to Java.
No one cares how much you know,
until they know how much you care.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Just Curious - What Is This Stuff???
« Reply #2 on: January 01, 2016, 07:47:52 PM »
Ex Delphi developer designed C#, when he go to MS ;)
May the source be with you

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: Just Curious - What Is This Stuff???
« Reply #3 on: January 02, 2016, 04:44:03 AM »
I've attached a sample and it looks like C++ code but I'm wondering if it is maybe C# ???.  Then why is it named ".cs" ???

Has anyone seen this stuff before?  Any idea of what language this is?
Yes, it is indeed C# code, and .cs is the default extension for C# source code, as the '#' is a 'troublesome' character to be used in a filename...

Happy New Year!

Ralf

PhilG57

  • Guest
Re: Just Curious - What Is This Stuff???
« Reply #4 on: January 02, 2016, 02:33:07 PM »
The c# code is nice looking but, to me, not as clean and pure as ".c" code.  Thanks to all for helping... 

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: Just Curious - What Is This Stuff???
« Reply #5 on: January 04, 2016, 05:47:51 AM »
Ex Delphi developer designed C#, when he go to MS ;)
Yup, it's almost 20 years now that he went over to the dark side...  :-\

Ralf

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: Just Curious - What Is This Stuff???
« Reply #6 on: January 04, 2016, 05:52:36 AM »
The c# code is nice looking but, to me, not as clean and pure as ".c" code.  Thanks to all for helping...
Well, for one, C# is a object oriented language and even in that small program, is calling a lot of methods and references properties of those objects, which by and large, are part of the .NET runtime environment.

For me, this just adds another layer of dependencies, which is why I try to stay as far away from it as possible...

Ralf

Grincheux

  • Guest
Re: Just Curious - What Is This Stuff???
« Reply #7 on: February 21, 2016, 05:01:18 AM »
One more spaghetti manufacturer.