Click here to Skip to main content
16,015,756 members
Home / Discussions / C#
   

C#

 
GeneralRe: encoding of textfile Pin
Luc Pattyn27-Apr-08 13:16
sitebuilderLuc Pattyn27-Apr-08 13:16 
GeneralEnvironment.Exit Pin
George_George27-Apr-08 4:41
George_George27-Apr-08 4:41 
GeneralRe: Environment.Exit Pin
S. Senthil Kumar27-Apr-08 6:10
S. Senthil Kumar27-Apr-08 6:10 
GeneralRe: Environment.Exit Pin
George_George27-Apr-08 17:18
George_George27-Apr-08 17:18 
QuestionCan any one tell me how to extract Excel worksheet images and store them in database? Pin
Ali00099927-Apr-08 1:34
Ali00099927-Apr-08 1:34 
AnswerRe: Can any one tell me how to extract Excel worksheet images and store them in database? Pin
#realJSOP27-Apr-08 3:01
professional#realJSOP27-Apr-08 3:01 
GeneralRe: Can any one tell me how to extract Excel worksheet images and store them in database? Pin
Ali00099928-Apr-08 19:18
Ali00099928-Apr-08 19:18 
QuestionHow to get cpu temp c# .NET [modified] Pin
kennet197427-Apr-08 1:32
kennet197427-Apr-08 1:32 
Hi C# guyes,
hope, that somebody can help me. I tryed for some days now, to get my code working. But without luck. I can get the temp of my CPU out in a messagebox, but when i am trying to covert it to celcius from kalvin i get no results. I want the temp. in celcius out in a messagebox. How do i do that? Can somebody explain me how to? I will pass my code, thanks a lot

kennet

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Management;

namespace GetCpuTemp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}




private void button1_Click(object sender, EventArgs e)
{


ManagementClass processClass = new ManagementClass (@"root\WMI:MSAcpi_ThermalZoneTemperature");

foreach (ManagementObject service in processClass.GetInstances())
{



MessageBox.Show("CPU Temperature: " + service.GetPropertyValue("CurrentTemperature"));


}
}


static decimal ConvertToCelsius(string reading)
{

return (decimal.Parse(reading) / 10 - 273.15m);

}





}
}

modified on Sunday, April 27, 2008 7:52 AM

AnswerRe: How to get cpu temp c# .NET Pin
Anthony Mushrow27-Apr-08 1:56
professionalAnthony Mushrow27-Apr-08 1:56 
GeneralRe: How to get cpu temp c# .NET Pin
Thomas Stockwell27-Apr-08 3:07
professionalThomas Stockwell27-Apr-08 3:07 
GeneralRe: How to get cpu temp c# .NET Pin
Anthony Mushrow27-Apr-08 3:15
professionalAnthony Mushrow27-Apr-08 3:15 
QuestionRe: How to get cpu temp c# .NET Pin
kennet197427-Apr-08 4:15
kennet197427-Apr-08 4:15 
GeneralRe: How to get cpu temp c# .NET Pin
Christian Graus27-Apr-08 11:43
protectorChristian Graus27-Apr-08 11:43 
QuestionProcess information in C# Pin
I'm a member...27-Apr-08 0:48
I'm a member...27-Apr-08 0:48 
GeneralRe: Process information in C# Pin
Anthony Mushrow27-Apr-08 1:48
professionalAnthony Mushrow27-Apr-08 1:48 
GeneralRe: Process information in C# Pin
I'm a member...27-Apr-08 20:43
I'm a member...27-Apr-08 20:43 
GeneralApplication.Exit Pin
George_George26-Apr-08 22:18
George_George26-Apr-08 22:18 
GeneralRe: Application.Exit Pin
Urs Enzler26-Apr-08 22:38
Urs Enzler26-Apr-08 22:38 
GeneralRe: Application.Exit Pin
George_George26-Apr-08 22:47
George_George26-Apr-08 22:47 
GeneralRe: Application.Exit Pin
Urs Enzler26-Apr-08 22:55
Urs Enzler26-Apr-08 22:55 
GeneralRe: Application.Exit Pin
George_George26-Apr-08 22:58
George_George26-Apr-08 22:58 
GeneralRe: Application.Exit Pin
MarkB77726-Apr-08 23:41
MarkB77726-Apr-08 23:41 
GeneralRe: Application.Exit Pin
George_George26-Apr-08 23:45
George_George26-Apr-08 23:45 
GeneralRe: Application.Exit Pin
Luc Pattyn27-Apr-08 0:35
sitebuilderLuc Pattyn27-Apr-08 0:35 
GeneralRe: Application.Exit Pin
George_George27-Apr-08 1:44
George_George27-Apr-08 1:44 

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.