Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
AnswerRe: create Microsoft Word Document in C# Pin
Richard MacCutchan26-Mar-10 23:07
mveRichard MacCutchan26-Mar-10 23:07 
GeneralRe: create Microsoft Word Document in C# Pin
Jassim Rahma27-Mar-10 12:29
Jassim Rahma27-Mar-10 12:29 
GeneralRe: create Microsoft Word Document in C# Pin
Richard MacCutchan27-Mar-10 21:26
mveRichard MacCutchan27-Mar-10 21:26 
GeneralRe: create Microsoft Word Document in C# Pin
Jassim Rahma28-Mar-10 11:45
Jassim Rahma28-Mar-10 11:45 
GeneralRe: create Microsoft Word Document in C# Pin
Richard MacCutchan28-Mar-10 12:02
mveRichard MacCutchan28-Mar-10 12:02 
QuestionDegrees, minutes and seconds to Decimal Degrees Pin
Darrall26-Mar-10 12:12
Darrall26-Mar-10 12:12 
AnswerRe: Degrees, minutes and seconds to Decimal Degrees Pin
Tarakeshwar Reddy26-Mar-10 12:23
professionalTarakeshwar Reddy26-Mar-10 12:23 
AnswerRe: Degrees, minutes and seconds to Decimal Degrees Pin
Roger Wright26-Mar-10 17:04
professionalRoger Wright26-Mar-10 17:04 
It's not a built-in function, but it's certainly not hard to do the arithmetic.

Subtract the int part of ##.#### from the original. The remainder will be .####. Multiply that by 60 and again take the int part of the result - that's the minutes. Subtract the minutes from the result of the first multiplication, then multiply the result by 60 again. The result is the seconds, though there may be a decimal part in the result if the original datum wasn't an integral number of seconds. You can remove that if you don't want it by again taking only the int part of the result.

I don't yet have enough experience with the language to suggest the syntax - for all I know, Convert.ToInt() might round, rather than truncate real values. If so you'll have to try another dodge. But it shouldn't be too difficult to manage. It's such a frequent problem, though, that I'm rather surprised that MS didn't include it as a stock function.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"

GeneralRe: Degrees, minutes and seconds to Decimal Degrees Pin
Darrall27-Mar-10 3:59
Darrall27-Mar-10 3:59 
Questionimplementing keyValue pair, with key as a Pair (2 valued key) Pin
edankk26-Mar-10 10:09
edankk26-Mar-10 10:09 
AnswerRe: implementing keyValue pair, with key as a Pair (2 valued key) Pin
Ian Shlasko26-Mar-10 11:04
Ian Shlasko26-Mar-10 11:04 
GeneralRe: implementing keyValue pair, with key as a Pair (2 valued key) Pin
edankk26-Mar-10 11:29
edankk26-Mar-10 11:29 
GeneralRe: implementing keyValue pair, with key as a Pair (2 valued key) Pin
Ian Shlasko26-Mar-10 11:49
Ian Shlasko26-Mar-10 11:49 
GeneralRe: implementing keyValue pair, with key as a Pair (2 valued key) Pin
edankk26-Mar-10 12:03
edankk26-Mar-10 12:03 
GeneralRe: implementing keyValue pair, with key as a Pair (2 valued key) Pin
Ian Shlasko26-Mar-10 12:12
Ian Shlasko26-Mar-10 12:12 
GeneralRe: implementing keyValue pair, with key as a Pair (2 valued key) Pin
edankk26-Mar-10 12:25
edankk26-Mar-10 12:25 
QuestionC# ActiveX & javascript Pin
Mohammad A Gdeisat26-Mar-10 7:30
Mohammad A Gdeisat26-Mar-10 7:30 
AnswerRepost Pin
Not Active26-Mar-10 7:49
mentorNot Active26-Mar-10 7:49 
GeneralRe: Repost Pin
Mohammad A Gdeisat26-Mar-10 9:37
Mohammad A Gdeisat26-Mar-10 9:37 
GeneralRe: Repost Pin
Not Active26-Mar-10 9:57
mentorNot Active26-Mar-10 9:57 
GeneralRe: Repost Pin
DaveyM6926-Mar-10 16:28
professionalDaveyM6926-Mar-10 16:28 
QuestionGet current page source from a toolbar Pin
Kirys26-Mar-10 5:09
Kirys26-Mar-10 5:09 
AnswerRe: Get current page source from a toolbar Pin
Kirys29-Mar-10 6:02
Kirys29-Mar-10 6:02 
Questionhow to string to binary Pin
tai-fun26-Mar-10 4:56
tai-fun26-Mar-10 4:56 
AnswerRe: how to string to binary Pin
Richard MacCutchan26-Mar-10 5:00
mveRichard MacCutchan26-Mar-10 5:00 

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.