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

C#

 
QuestionSharepoint.Administrator API Pin
Nemesis1410-Jan-08 0:33
Nemesis1410-Jan-08 0:33 
GeneralRe: Sharepoint.Administrator API Pin
Nemesis1414-Jan-08 2:01
Nemesis1414-Jan-08 2:01 
Generalweb services in windows application Pin
caradri10-Jan-08 0:22
caradri10-Jan-08 0:22 
GeneralRe: web services in windows application Pin
satsumatable10-Jan-08 0:51
satsumatable10-Jan-08 0:51 
GeneralRe: web services in windows application Pin
caradri10-Jan-08 0:59
caradri10-Jan-08 0:59 
GeneralRe: web services in windows application Pin
Vikram A Punathambekar10-Jan-08 1:44
Vikram A Punathambekar10-Jan-08 1:44 
GeneralSockets Pin
half-life9-Jan-08 23:50
half-life9-Jan-08 23:50 
Answerstring formatting :-( Pin
srm749-Jan-08 23:35
srm749-Jan-08 23:35 
Hi, Big Grin | :-D

I'm trying to create a string that contains 3 characters.. (0x1B,0x61,0xn)
The last character is a parameter n, which can be from 0 to 9.

One approach is:

byte param = 0x02;

byte[] arr = new byte[3];
arr[0] = 0x1B;
arr[1] = 0x61;
arr[2] = param;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
string str = enc.GetString(arr);

It works, but seems a bit cumbersome.. Frown | :(

If parameter was allways i.e. 0x02 then asolution could be

string s2 = "\x1B\x61\x02";

If I just add like this:

string s2 = "\x1B\x61" + param (2);

Then the string's 3th value is 0x50 "2" instead of 2 (ascii value)

Anyone have any idea???

Thx in advance..

Søren
GeneralRe: string formatting :-( Pin
m@u9-Jan-08 23:59
m@u9-Jan-08 23:59 
GeneralRe: string formatting :-( Pin
Luc Pattyn10-Jan-08 3:47
sitebuilderLuc Pattyn10-Jan-08 3:47 
Generalinstalling a eventlog Pin
cignox19-Jan-08 23:09
cignox19-Jan-08 23:09 
GeneralKeeping refered DLL's in sub folders Pin
N a v a n e e t h9-Jan-08 23:04
N a v a n e e t h9-Jan-08 23:04 
QuestionError in setup project Pin
Muammar©9-Jan-08 22:53
Muammar©9-Jan-08 22:53 
GeneralRe: Error in setup project Pin
satsumatable9-Jan-08 23:00
satsumatable9-Jan-08 23:00 
GeneralRe: Error in setup project Pin
Muammar©11-Jan-08 19:13
Muammar©11-Jan-08 19:13 
GeneralOutlook type control... Pin
Pankaj - Joshi9-Jan-08 22:43
Pankaj - Joshi9-Jan-08 22:43 
GeneralRe: Outlook type control... Pin
Giorgi Dalakishvili9-Jan-08 22:48
mentorGiorgi Dalakishvili9-Jan-08 22:48 
Generaldatagridviewcheckbox Pin
kiran@p2softech9-Jan-08 22:31
kiran@p2softech9-Jan-08 22:31 
GeneralRe: datagridviewcheckbox Pin
Justin Perez10-Jan-08 3:44
Justin Perez10-Jan-08 3:44 
QuestionHow to do math operations with generic function arguments? Pin
Chesnokov Yuriy9-Jan-08 22:30
professionalChesnokov Yuriy9-Jan-08 22:30 
GeneralRe: How to do math operations with generic function arguments? Pin
CKnig9-Jan-08 22:54
CKnig9-Jan-08 22:54 
GeneralRe: How to do math operations with generic function arguments? Pin
NassosReyzidis10-Jan-08 3:35
NassosReyzidis10-Jan-08 3:35 
GeneralReceive data of Unkown Size Pin
Waqas Badar9-Jan-08 22:21
Waqas Badar9-Jan-08 22:21 
GeneralRe: Receive data of Unkown Size Pin
satsumatable9-Jan-08 22:39
satsumatable9-Jan-08 22:39 
GeneralRe: Receive data of Unkown Size Pin
Waqas Badar10-Jan-08 0:30
Waqas Badar10-Jan-08 0:30 

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.