Click here to Skip to main content
15,909,835 members
Home / Discussions / C#
   

C#

 
GeneralRe: Rotate printing Pin
damichab23-Apr-09 3:31
damichab23-Apr-09 3:31 
GeneralRe: Rotate printing Pin
Luc Pattyn23-Apr-09 3:36
sitebuilderLuc Pattyn23-Apr-09 3:36 
GeneralRe: Rotate printing Pin
Luc Pattyn23-Apr-09 5:01
sitebuilderLuc Pattyn23-Apr-09 5:01 
GeneralRe: Rotate printing Pin
damichab22-Apr-09 21:15
damichab22-Apr-09 21:15 
QuestionWebBrowser.ScriptErrorsSuppressed = true and self signed certifcates Pin
jo H21-Apr-09 13:52
jo H21-Apr-09 13:52 
Questionanyone has any problem with Milestone 4 Cosmos? Pin
john231321-Apr-09 11:51
john231321-Apr-09 11:51 
AnswerRe: anyone has any problem with Milestone 4 Cosmos? Pin
Christian Graus21-Apr-09 14:04
protectorChristian Graus21-Apr-09 14:04 
Questionconvert time and minutes Pin
onetreeup21-Apr-09 8:58
onetreeup21-Apr-09 8:58 
I am working on a method to convert time, 00:00 to a double 00.00, and separate the minutes from the time to calculate elapsed time. I have two methods, but am getting a 'Invalid rank specifier: expected',' or ']' error.

Hope this is not too long, please help.

class TimeConversion
{
static void Main(string[] args)
{
string time = "00:00";
double hours = TimeSpan.Parse(time).TotalHours;
double minutes = TimeSpan.Parse(time).TotalMinutes;

string[] timeArray = new string[14]{"8:17", "15:26", "18:32", "0:46", "10:38", "13:56"};
//return timeArray;
Convert.ToDecimal(timeArray);
Console.WriteLine("8:17", "15:26", "18:32", "0:46", "10:38", "13:56");
Console.ReadKey();
}

static double ConvertTime(string clockIn, string clockOut)
{
string time = "00:00";
double hours = TimeSpan.Parse(time).TotalHours;
double minutes = TimeSpan.Parse(time).TotalMinutes;

double dminutes = Convert.ToDouble(minutes);
foreach (
if (dminutes >= .07)
dminutes = 0.00;
if (dminutes <= .22)
dminutes = 0.25;
if (dminutes <= .37)
dminutes = 0.50;
if (dminutes <= .53)
dminutes = 0.75;
if (dminutes > 53)
dminutes = 1.0;
return ConvertTime;
}
}


Thanks

OneTreeUp
AnswerRe: convert time and minutes Pin
PIEBALDconsult21-Apr-09 9:08
mvePIEBALDconsult21-Apr-09 9:08 
GeneralRe: convert time and minutes Pin
onetreeup21-Apr-09 9:21
onetreeup21-Apr-09 9:21 
AnswerRe: convert time and minutes Pin
Edwin Brunner21-Apr-09 9:23
Edwin Brunner21-Apr-09 9:23 
GeneralRe: convert time and minutes Pin
onetreeup21-Apr-09 9:36
onetreeup21-Apr-09 9:36 
GeneralRe: convert time and minutes Pin
Edwin Brunner21-Apr-09 9:50
Edwin Brunner21-Apr-09 9:50 
Questionhow to change property of form in an other started thread? Pin
Sajjad Izadi21-Apr-09 8:08
Sajjad Izadi21-Apr-09 8:08 
AnswerRe: how to change property of form in an other started thread? Pin
Henry Minute21-Apr-09 8:16
Henry Minute21-Apr-09 8:16 
GeneralRe: how to change property of form in an other started thread? [modified] Pin
Sajjad Izadi21-Apr-09 9:03
Sajjad Izadi21-Apr-09 9:03 
AnswerRe: how to change property of form in an other started thread? [modified] Pin
DaveyM6921-Apr-09 10:44
professionalDaveyM6921-Apr-09 10:44 
QuestionWhere to start? - Calculating the size of an object (square footage) in an image Pin
shultas21-Apr-09 8:06
shultas21-Apr-09 8:06 
AnswerRe: Where to start? - Calculating the size of an object (square footage) in an image Pin
Henry Minute21-Apr-09 8:19
Henry Minute21-Apr-09 8:19 
AnswerRe: Where to start? - Calculating the size of an object (square footage) in an image Pin
bulg21-Apr-09 12:11
bulg21-Apr-09 12:11 
QuestionEmbed PDF viewer in C# Windows App Pin
Engineer Joe21-Apr-09 7:24
Engineer Joe21-Apr-09 7:24 
QuestionReturn a function value after leaving the function and wait for corresponding event? Pin
rpm820021-Apr-09 5:05
rpm820021-Apr-09 5:05 
AnswerRe: Return a function value after leaving the function and wait for corresponding event? Pin
DaveyM6921-Apr-09 5:53
professionalDaveyM6921-Apr-09 5:53 
QuestionDeleting a node from Xml Pin
MehmetKocc21-Apr-09 4:49
MehmetKocc21-Apr-09 4:49 
AnswerRe: Deleting a node from Xml Pin
Christian Graus21-Apr-09 11:24
protectorChristian Graus21-Apr-09 11:24 

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.