Click here to Skip to main content
15,911,646 members
Home / Discussions / C#
   

C#

 
GeneralRe: Action<T> Delegate usage between 2 applications Pin
Member 1171394229-Jun-15 20:26
Member 1171394229-Jun-15 20:26 
AnswerRe: Action<T> Delegate usage between 2 applications Pin
HaldorPhil20-Aug-15 6:57
HaldorPhil20-Aug-15 6:57 
Question[SOLVED] SQL Server 2014 & SqlDataSourceEnumerator Pin
MooKowMyke30-May-15 19:14
MooKowMyke30-May-15 19:14 
AnswerRe: SQL Server 2014 & SqlDataSourceEnumerator Pin
MooKowMyke30-May-15 20:37
MooKowMyke30-May-15 20:37 
AnswerRe: SQL Server 2014 & SqlDataSourceEnumerator Pin
Eddy Vluggen31-May-15 0:52
professionalEddy Vluggen31-May-15 0:52 
GeneralRe: SQL Server 2014 & SqlDataSourceEnumerator Pin
MooKowMyke31-May-15 17:20
MooKowMyke31-May-15 17:20 
QuestionHow to change datatype of a variable without changing its value ? Pin
Member 968349129-May-15 22:14
Member 968349129-May-15 22:14 
AnswerRe: How to change datatype of a variable without changing its value ? Pin
OriginalGriff29-May-15 22:59
mveOriginalGriff29-May-15 22:59 
Um...you can't, not really.
The problem is that a string is made of an array of chars, each of which is a 16 bit value in UNICODE, while an array of bytes contains 8 bit values.

You can get a byte stream which holds the data from the string:
C#
string s = ...
byte[] bytes = System.Text.Encoding.Unicode.GetBytes(s);
Or you can get an ASCII version which is more likely to work with more external applications:
C#
string s = ...
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(s);

But an array of bytes is not an array of chars, and thus not a string.
And you definitely can't treat an array of bytes as a string!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

QuestionNot able to insert my data into sql db. Getting that annoying null error! Pin
Norris Chappell29-May-15 7:15
Norris Chappell29-May-15 7:15 
AnswerRe: Not able to insert my data into sql db. Getting that annoying null error! Pin
Richard Deeming29-May-15 7:41
mveRichard Deeming29-May-15 7:41 
AnswerRe: Not able to insert my data into sql db. Getting that annoying null error! Pin
Sascha Lefèvre29-May-15 7:48
professionalSascha Lefèvre29-May-15 7:48 
GeneralRe: Not able to insert my data into sql db. Getting that annoying null error! Pin
Norris Chappell29-May-15 8:14
Norris Chappell29-May-15 8:14 
GeneralRe: Not able to insert my data into sql db. Getting that annoying null error! Pin
Sascha Lefèvre29-May-15 12:33
professionalSascha Lefèvre29-May-15 12:33 
GeneralRe: Not able to insert my data into sql db. Getting that annoying null error! Pin
Norris Chappell31-May-15 8:41
Norris Chappell31-May-15 8:41 
GeneralRe: Not able to insert my data into sql db. Getting that annoying null error! Pin
Sascha Lefèvre31-May-15 8:58
professionalSascha Lefèvre31-May-15 8:58 
QuestionLoad specific userControl from DLL Pin
Jassim Rahma29-May-15 5:29
Jassim Rahma29-May-15 5:29 
AnswerRe: Load specific userControl from DLL Pin
Bernhard Hiller29-May-15 5:55
Bernhard Hiller29-May-15 5:55 
Generalvideo streaming mvc3 c#,html5 and jquery Pin
saiguttina29-May-15 0:25
saiguttina29-May-15 0:25 
GeneralMessage Closed Pin
28-May-15 23:39
Member 1172789928-May-15 23:39 
AnswerRe: help with calculator program Pin
V.28-May-15 23:45
professionalV.28-May-15 23:45 
AnswerRe: help with calculator program Pin
OriginalGriff29-May-15 0:08
mveOriginalGriff29-May-15 0:08 
QuestionSharePoint Pin
Armugam Indrani28-May-15 22:41
professionalArmugam Indrani28-May-15 22:41 
AnswerRe: SharePoint Pin
Eddy Vluggen29-May-15 2:50
professionalEddy Vluggen29-May-15 2:50 
QuestionTCP Heartbeat background Thread Pin
MooKowMyke27-May-15 21:50
MooKowMyke27-May-15 21:50 
AnswerRe: TCP Heartbeat background Thread Pin
Eddy Vluggen29-May-15 2:57
professionalEddy Vluggen29-May-15 2:57 

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.