Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is There An Incantation I'm supposed To Recite To Make The Data Appear? Pin
dan!sh 14-May-11 21:01
professional dan!sh 14-May-11 21:01 
GeneralRe: Is There An Incantation I'm supposed To Recite To Make The Data Appear? Pin
Roger Wright15-May-11 4:26
professionalRoger Wright15-May-11 4:26 
AnswerRe: Is There An Incantation I'm supposed To Recite To Make The Data Appear? Pin
OriginalGriff14-May-11 21:06
mveOriginalGriff14-May-11 21:06 
GeneralRe: Is There An Incantation I'm supposed To Recite To Make The Data Appear? Pin
#realJSOP15-May-11 0:32
professional#realJSOP15-May-11 0:32 
GeneralRe: Is There An Incantation I'm supposed To Recite To Make The Data Appear? Pin
Luc Pattyn15-May-11 2:34
sitebuilderLuc Pattyn15-May-11 2:34 
GeneralRe: Is There An Incantation I'm supposed To Recite To Make The Data Appear? Pin
Roger Wright15-May-11 4:39
professionalRoger Wright15-May-11 4:39 
GeneralRe: Is There An Incantation I'm supposed To Recite To Make The Data Appear? Pin
Roger Wright15-May-11 4:28
professionalRoger Wright15-May-11 4:28 
QuestionBeginner c# question Pin
SFORavi14-May-11 16:10
SFORavi14-May-11 16:10 
Hi I am moving from mainframe to C#. So trying some basic C# programs ( I am like LKG in c#)

I wrote a simple temp conversion class as follows


namespace TempConversions
{
public class Temperature
{
private float temp, newTemp;


public Temperature(string thisTemp)
{
temp = Convert.ToSingle(thisTemp);
}

public string getCels()
{
newTemp = 5 * (temp - 32) / 9;
return newTemp.ToString();
}

}

}


Now I want to write another test class from where I need to give in temp in *F and get the converted temp in degree celcius,

I am stuck in syntax to call this Temperature class. Any help on the syntax will be really appreciated.


namespace TempConversions
{
class TestTempConv
{

public static void Main(string[] args)
{

float testTemp ;

//convert float to temp

//invoke Temperature.GetCels method

//Print temp in degree celcius




}

}
}
AnswerRe: Beginner c# question Pin
Luc Pattyn14-May-11 16:57
sitebuilderLuc Pattyn14-May-11 16:57 
GeneralRe: Beginner c# question Pin
SFORavi14-May-11 18:34
SFORavi14-May-11 18:34 
AnswerRe: Beginner c# question Pin
Luc Pattyn14-May-11 18:39
sitebuilderLuc Pattyn14-May-11 18:39 
GeneralRe: Beginner c# question Pin
Roger Wright14-May-11 20:11
professionalRoger Wright14-May-11 20:11 
GeneralRe: Beginner c# question Pin
Richard MacCutchan14-May-11 21:32
mveRichard MacCutchan14-May-11 21:32 
AnswerRe: Beginner c# question Pin
PIEBALDconsult14-May-11 18:52
mvePIEBALDconsult14-May-11 18:52 
GeneralRe: Beginner c# question Pin
jschell16-May-11 8:37
jschell16-May-11 8:37 
AnswerRe: Beginner c# question Pin
jschell16-May-11 8:39
jschell16-May-11 8:39 
Questionhow to disable and enable network access with simple c# code Pin
MohammedMahmoud14-May-11 10:41
MohammedMahmoud14-May-11 10:41 
AnswerRe: how to disable and enable network access with simple c# code Pin
jschell14-May-11 11:31
jschell14-May-11 11:31 
GeneralRe: how to disable and enable network access with simple c# code Pin
MohammedMahmoud14-May-11 11:44
MohammedMahmoud14-May-11 11:44 
GeneralRe: how to disable and enable network access with simple c# code Pin
jschell16-May-11 8:29
jschell16-May-11 8:29 
AnswerRe: how to disable and enable network access with simple c# code Pin
Luc Pattyn14-May-11 12:11
sitebuilderLuc Pattyn14-May-11 12:11 
GeneralRe: how to disable and enable network access with simple c# code Pin
dybs17-May-11 16:11
dybs17-May-11 16:11 
AnswerRe: how to disable and enable network access with simple c# code Pin
Richard MacCutchan14-May-11 21:37
mveRichard MacCutchan14-May-11 21:37 
QuestionHow can my hosted asp.net website access my local machine database Pin
akosidandan14-May-11 2:15
akosidandan14-May-11 2:15 
AnswerRe: How can my hosted asp.net website access my local machine database Pin
Luc Pattyn14-May-11 2:45
sitebuilderLuc Pattyn14-May-11 2:45 

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.