Click here to Skip to main content
15,903,033 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# .NET 1.1 - MethodBase.Invoke on virtual methods (dynamic method lookup) Pin
S. Senthil Kumar9-Aug-06 20:23
S. Senthil Kumar9-Aug-06 20:23 
GeneralRe: C# .NET 1.1 - MethodBase.Invoke on virtual methods (dynamic method lookup) Pin
Roman Nurik9-Aug-06 20:26
Roman Nurik9-Aug-06 20:26 
GeneralRe: C# .NET 1.1 - MethodBase.Invoke on virtual methods (dynamic method lookup) Pin
Vivek.Sivasamy10-Aug-06 20:38
Vivek.Sivasamy10-Aug-06 20:38 
QuestionRename AD Accounts Pin
neb24usa9-Aug-06 12:03
neb24usa9-Aug-06 12:03 
AnswerRe: Rename AD Accounts Pin
Not Active9-Aug-06 15:02
mentorNot Active9-Aug-06 15:02 
QuestionConverting VB.NET 2.0 Strings.Chr Pin
DocH0liday9-Aug-06 11:29
DocH0liday9-Aug-06 11:29 
AnswerRe: Converting VB.NET 2.0 Strings.Chr Pin
Christian Graus9-Aug-06 11:53
protectorChristian Graus9-Aug-06 11:53 
GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
DocH0liday9-Aug-06 12:05
DocH0liday9-Aug-06 12:05 
Ok so the Rest of that string can be Eliminated totally???

with like:: headerReturn = Name(char(65)); ?? what about the rest of it

Strings.Chr(int.Parse("&H" + PacketType)) + new string(Strings.Chr(0), 8) + pck;

I understand what your saying,I'm not putting Visual Basic in my C# code by any means...I'm just trying to Convert that string into a complete string for C#...I'm fairly new to working with Char in C#...

or would it be something along this line::

headerReturn = Name + (char(65)) + (char(int.Parse("&H" + PacketType))) + pck; ????

So you get the Whole picture here is the Entire Block of Code::

public static string Header( string PacketType, string pck ) <br />
        {<br />
           <br />
            string headerReturn = null;<br />
            short i = 0; <br />
            short x = 0; <br />
            /*x = 0; this section might not be needed*/<br />
            i = System.Convert.ToInt16(pck.Length); <br />
            while ( i > 255 ) <br />
            { <br />
                i = System.Convert.ToInt16( i - 256 ); <br />
                x = System.Convert.ToInt16( x + 1 ); <br />
            }<br />
            headerReturn = Name + char.ConvertFromUtf32(0) + char.ConvertFromUtf32(Ver) + new string(char.ConvertToUtf32(0), 2) + Strings.Chr(x) + Strings.Chr(i) + Strings.Chr(0) + Strings.Chr(int.Parse("&H" + PacketType)) + new string(Strings.Chr(0), 8) + pck; <br />
            Debug.Print( headerReturn ); <br />
            return headerReturn;<br />
        }

GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
Christian Graus9-Aug-06 12:15
protectorChristian Graus9-Aug-06 12:15 
GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
DocH0liday9-Aug-06 12:44
DocH0liday9-Aug-06 12:44 
GeneralRe: Converting VB.NET 2.0 Strings.Chr Pin
Christian Graus9-Aug-06 14:07
protectorChristian Graus9-Aug-06 14:07 
QuestionIndexers Pin
erikkl20009-Aug-06 10:36
erikkl20009-Aug-06 10:36 
AnswerRe: Indexers Pin
Christian Graus9-Aug-06 11:48
protectorChristian Graus9-Aug-06 11:48 
QuestionMAPI and C# Pin
mbnbonin9-Aug-06 9:32
mbnbonin9-Aug-06 9:32 
AnswerRe: MAPI and C# Pin
mav.northwind9-Aug-06 21:05
mav.northwind9-Aug-06 21:05 
GeneralRe: MAPI and C# Pin
mbnbonin10-Aug-06 11:24
mbnbonin10-Aug-06 11:24 
AnswerRe: MAPI and C# Pin
ylhyh26-May-09 20:36
ylhyh26-May-09 20:36 
QuestionGlobal events or messaging. Pin
Larantz9-Aug-06 8:24
Larantz9-Aug-06 8:24 
AnswerRe: Global events or messaging. Pin
Not Active9-Aug-06 9:39
mentorNot Active9-Aug-06 9:39 
GeneralRe: Global events or messaging. Pin
mbnbonin9-Aug-06 9:43
mbnbonin9-Aug-06 9:43 
GeneralRe: Global events or messaging. Pin
Not Active9-Aug-06 14:58
mentorNot Active9-Aug-06 14:58 
GeneralRe: Global events or messaging. [modified] Pin
Larantz10-Aug-06 23:14
Larantz10-Aug-06 23:14 
Questionhow to call functions in unmanaged C++ dll from C# app Pin
moniqui9-Aug-06 8:09
moniqui9-Aug-06 8:09 
AnswerRe: how to call functions in unmanaged C++ dll from C# app Pin
Judah Gabriel Himango9-Aug-06 9:01
sponsorJudah Gabriel Himango9-Aug-06 9:01 
GeneralRe: how to call functions in unmanaged C++ dll from C# app Pin
moniqui9-Aug-06 9:30
moniqui9-Aug-06 9: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.