Click here to Skip to main content
15,905,322 members
Home / Discussions / C#
   

C#

 
AnswerRe: DLL reference fails after first build Pin
fjdiewornncalwe3-Jan-11 4:53
professionalfjdiewornncalwe3-Jan-11 4:53 
GeneralRe: DLL reference fails after first build Pin
JacquesDP3-Jan-11 19:35
JacquesDP3-Jan-11 19:35 
AnswerRe: DLL reference fails after first build Pin
jschell3-Jan-11 10:02
jschell3-Jan-11 10:02 
GeneralRe: DLL reference fails after first build Pin
JacquesDP3-Jan-11 19:31
JacquesDP3-Jan-11 19:31 
GeneralRe: DLL reference fails after first build Pin
JacquesDP3-Jan-11 19:58
JacquesDP3-Jan-11 19:58 
GeneralRe: DLL reference fails after first build [modified] Pin
JacquesDP3-Jan-11 20:19
JacquesDP3-Jan-11 20:19 
QuestionWhat I want to ignore the message which start with 55 55 with length equal 6 ? ( Dealing With Bytes) Pin
Honeyboy_203-Jan-11 3:11
Honeyboy_203-Jan-11 3:11 
AnswerRe: What I want to ignore the message which start with 55 55 with length equal 6 ? ( Dealing With Bytes) Pin
OriginalGriff3-Jan-11 3:31
mveOriginalGriff3-Jan-11 3:31 
Oh dear.
Firstly, stop using magic numbers. Define these as constant byte values with sensible names and use them instead. It makes your code more readable, and easier to maintain.
private constant byte SequenceInto = 0x55;

Secondly, stop converting to strings!
if (VopMessageDetails[0 + prevBlockLengths].ToString() == "85" & VopMessageDetails[1 + prevBlockLengths].ToString() == "85")

instead use:
if (VopMessageDetails[0 + prevBlockLengths] == SequenceIntro & VopMessageDetails[1 + prevBlockLengths] == SequenceIntro)


You may find this solves your problem:
if (VopMessageDetails[0 + prevBlockLengths].ToString() == "85" & VopMessageDetails[1 + prevBlockLengths].ToString() == "85")
{
    if (VopMessageDetails[i].ToString() != "204")
    {
        if (VopMessageDetails[i].ToString() == "55" & VopMessageDetails[i + 1].ToString() == "55")
Did you forget to do the hex conversion here?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

GeneralRe: What I want to ignore the message which start with 55 55 with length equal 6 ? ( Dealing With Bytes) Pin
Honeyboy_203-Jan-11 3:36
Honeyboy_203-Jan-11 3:36 
GeneralRe: What I want to ignore the message which start with 55 55 with length equal 6 ? ( Dealing With Bytes) Pin
OriginalGriff3-Jan-11 3:41
mveOriginalGriff3-Jan-11 3:41 
QuestionFetching Website Visitor Details By Email Pin
rowdykuttan3-Jan-11 2:11
rowdykuttan3-Jan-11 2:11 
AnswerRe: Fetching Website Visitor Details By Email Pin
Not Active3-Jan-11 2:40
mentorNot Active3-Jan-11 2:40 
AnswerRe: Fetching Website Visitor Details By Email Pin
GenJerDan3-Jan-11 4:28
GenJerDan3-Jan-11 4:28 
AnswerRe: Fetching Website Visitor Details By Email Pin
T M Gray3-Jan-11 9:49
T M Gray3-Jan-11 9:49 
QuestionSFTP using Sharp SSH Pin
SG21072-Jan-11 20:02
SG21072-Jan-11 20:02 
AnswerRe: SFTP using Sharp SSH Pin
OriginalGriff2-Jan-11 21:04
mveOriginalGriff2-Jan-11 21:04 
AnswerRe: SFTP using Sharp SSH Pin
Bernhard Hiller2-Jan-11 21:17
Bernhard Hiller2-Jan-11 21:17 
QuestionChanging Console font Pin
Mc_Topaz2-Jan-11 11:28
Mc_Topaz2-Jan-11 11:28 
AnswerRe: Changing Console font PinPopular
PIEBALDconsult2-Jan-11 15:19
mvePIEBALDconsult2-Jan-11 15:19 
AnswerRe: Changing Console font Pin
DaveyM692-Jan-11 18:03
professionalDaveyM692-Jan-11 18:03 
GeneralRe: Changing Console font Pin
Mc_Topaz2-Jan-11 22:16
Mc_Topaz2-Jan-11 22:16 
QuestionCan't set Label.Text Pin
Pelgar2-Jan-11 6:57
Pelgar2-Jan-11 6:57 
AnswerRe: Can't set Label.Text Pin
Luc Pattyn2-Jan-11 7:07
sitebuilderLuc Pattyn2-Jan-11 7:07 
GeneralRe: Can't set Label.Text [modified] Pin
Pelgar2-Jan-11 7:13
Pelgar2-Jan-11 7:13 
GeneralRe: Can't set Label.Text Pin
Luc Pattyn2-Jan-11 9:01
sitebuilderLuc Pattyn2-Jan-11 9:01 

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.