Click here to Skip to main content
15,889,462 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# accessing a web service Pin
Pete O'Hanlon20-Aug-12 22:28
mvePete O'Hanlon20-Aug-12 22:28 
AnswerRe: C# accessing a web service Pin
jschell21-Aug-12 8:32
jschell21-Aug-12 8:32 
QuestionTOP-SECRET LDAP Pin
SFORavi20-Aug-12 11:41
SFORavi20-Aug-12 11:41 
AnswerRe: TOP-SECRET LDAP Pin
Dave Kreskowiak20-Aug-12 12:50
mveDave Kreskowiak20-Aug-12 12:50 
QuestionConvert dateTime components to hex then byte[] Pin
MichCl20-Aug-12 5:05
MichCl20-Aug-12 5:05 
AnswerRe: Convert dateTime components to hex then byte[] Pin
Pete O'Hanlon20-Aug-12 5:32
mvePete O'Hanlon20-Aug-12 5:32 
GeneralRe: Convert dateTime components to hex then byte[] Pin
MichCl20-Aug-12 5:55
MichCl20-Aug-12 5:55 
GeneralRe: Convert dateTime components to hex then byte[] Pin
Pete O'Hanlon20-Aug-12 6:06
mvePete O'Hanlon20-Aug-12 6:06 
So just use the following to convert:
C#
private byte[] Convert(int datePart)
{
  // First of all, convert the date part into hex.
  string convertedPart = datePart.ToString("X2");
  // Now, return the byte array for the part.
  System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
  return enc.GetBytes(convertedPart);
}

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Convert dateTime components to hex then byte[] Pin
MichCl20-Aug-12 7:04
MichCl20-Aug-12 7:04 
AnswerRe: Convert dateTime components to hex then byte[] Pin
SledgeHammer0120-Aug-12 6:42
SledgeHammer0120-Aug-12 6:42 
GeneralRe: Convert dateTime components to hex then byte[] Pin
MichCl20-Aug-12 7:37
MichCl20-Aug-12 7:37 
GeneralRe: Convert dateTime components to hex then byte[] Pin
DaveyM6920-Aug-12 11:12
professionalDaveyM6920-Aug-12 11:12 
GeneralRe: Convert dateTime components to hex then byte[] Pin
MichCl21-Aug-12 1:52
MichCl21-Aug-12 1:52 
GeneralRe: Convert dateTime components to hex then byte[] Pin
DaveyM6921-Aug-12 7:55
professionalDaveyM6921-Aug-12 7:55 
GeneralRe: Convert dateTime components to hex then byte[] Pin
MichCl21-Aug-12 8:47
MichCl21-Aug-12 8:47 
QuestionWPF: use enum as index for Binding Pin
LionAM19-Aug-12 23:38
LionAM19-Aug-12 23:38 
AnswerRe: WPF: use enum as index for Binding Pin
Pete O'Hanlon20-Aug-12 0:27
mvePete O'Hanlon20-Aug-12 0:27 
GeneralRe: WPF: use enum as index for Binding Pin
LionAM20-Aug-12 1:34
LionAM20-Aug-12 1:34 
GeneralRe: WPF: use enum as index for Binding Pin
Pete O'Hanlon20-Aug-12 1:37
mvePete O'Hanlon20-Aug-12 1:37 
GeneralRe: WPF: use enum as index for Binding Pin
LionAM20-Aug-12 1:47
LionAM20-Aug-12 1:47 
AnswerRe: WPF: use enum as index for Binding Pin
Eddy Vluggen20-Aug-12 0:48
professionalEddy Vluggen20-Aug-12 0:48 
GeneralRe: WPF: use enum as index for Binding Pin
LionAM20-Aug-12 1:41
LionAM20-Aug-12 1:41 
GeneralRe: WPF: use enum as index for Binding Pin
Eddy Vluggen20-Aug-12 1:47
professionalEddy Vluggen20-Aug-12 1:47 
QuestionTypedDataSet synchronisation using compact framework Pin
VenkataRamana.Gali19-Aug-12 23:11
VenkataRamana.Gali19-Aug-12 23:11 
AnswerRe: TypedDataSet synchronisation using compact framework Pin
Pete O'Hanlon20-Aug-12 0:17
mvePete O'Hanlon20-Aug-12 0:17 

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.