Click here to Skip to main content
15,886,019 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using UserControls Pin
Ian Shlasko28-Aug-12 9:59
Ian Shlasko28-Aug-12 9:59 
GeneralRe: Using UserControls Pin
WebMaster28-Aug-12 10:08
WebMaster28-Aug-12 10:08 
GeneralRe: Using UserControls Pin
Ian Shlasko28-Aug-12 10:15
Ian Shlasko28-Aug-12 10:15 
QuestionPDF417 generator and reader supports Arabic Pin
dinadido28-Aug-12 8:15
dinadido28-Aug-12 8:15 
AnswerRe: PDF417 generator and reader supports Arabic Pin
Ian Shlasko28-Aug-12 9:22
Ian Shlasko28-Aug-12 9:22 
GeneralRe: PDF417 generator and reader supports Arabic Pin
dinadido28-Aug-12 11:18
dinadido28-Aug-12 11:18 
GeneralRe: PDF417 generator and reader supports Arabic Pin
Ian Shlasko28-Aug-12 11:25
Ian Shlasko28-Aug-12 11:25 
QuestionUpdating portion of byte array not working Pin
MichCl28-Aug-12 2:02
MichCl28-Aug-12 2:02 
I'm trying to update a portion of a byte array with modified data and for some reason it's always unchanged. Any input would be appreciated.

Right now, I have a temporary array that I'm trying to do an array copy for part of the array to update the data. This isn't working. Before that, I didn't have a temporary array and was doing basically the same thing with the destination array. The data locations I'm writing to are 0 after the update, but I am seeing the correct data in my tempStrings and convertStringToBytes method.

private void updateDatWithData()
{
            int returnCode = 0;
            byte[] tempByteArr = new byte[Dat.Length];

            //ex. 005R00099 ==> 005 R 00099 ==> 005 52 00099 ==> 00 55 20 00 99
            String tempString = (configNum[0].ToString() + configNum[1].ToString()); //ex. 00
            byte tempByte = 0;
            returnCode = convertStringToByte(tempString, ref tempByteArr[index + 4]); // ??Dat isn't getting updated below.

...
            Array.Copy(tempByteArr, (index+ 4), Dat, (index + 4), 5);
}

private int convertStringToByte(String theString, ref byte theByte)
{
            int returnCode = 1;
            try
            {
                theByte = System.Convert.ToByte(theString);
            }            
            return returnCode;
}

AnswerRe: Updating portion of byte array not working Pin
Keith Barrow28-Aug-12 2:32
professionalKeith Barrow28-Aug-12 2:32 
GeneralRe: Updating portion of byte array not working Pin
MichCl28-Aug-12 2:38
MichCl28-Aug-12 2:38 
GeneralRe: Updating portion of byte array not working Pin
Keith Barrow28-Aug-12 2:47
professionalKeith Barrow28-Aug-12 2:47 
GeneralRe: Updating portion of byte array not working Pin
MichCl28-Aug-12 3:16
MichCl28-Aug-12 3:16 
GeneralRe: Updating portion of byte array not working Pin
Keith Barrow28-Aug-12 3:54
professionalKeith Barrow28-Aug-12 3:54 
SuggestionRe: Updating portion of byte array not working Pin
Shameel28-Aug-12 4:00
professionalShameel28-Aug-12 4:00 
GeneralRe: Updating portion of byte array not working Pin
Keith Barrow28-Aug-12 4:32
professionalKeith Barrow28-Aug-12 4:32 
GeneralRe: Updating portion of byte array not working Pin
DaveyM6928-Aug-12 5:16
professionalDaveyM6928-Aug-12 5:16 
GeneralRe: Updating portion of byte array not working Pin
Keith Barrow28-Aug-12 6:07
professionalKeith Barrow28-Aug-12 6:07 
GeneralRe: Updating portion of byte array not working Pin
MichCl28-Aug-12 4:33
MichCl28-Aug-12 4:33 
SuggestionRe: Updating portion of byte array not working Pin
Shameel28-Aug-12 4:43
professionalShameel28-Aug-12 4:43 
GeneralRe: Updating portion of byte array not working Pin
MichCl28-Aug-12 2:43
MichCl28-Aug-12 2:43 
Questionhello Pin
ri198728-Aug-12 1:10
ri198728-Aug-12 1:10 
AnswerRe: hello PinPopular
Keith Barrow28-Aug-12 1:20
professionalKeith Barrow28-Aug-12 1:20 
SuggestionRe: hello Pin
pramod.hegde28-Aug-12 1:57
professionalpramod.hegde28-Aug-12 1:57 
AnswerRe: hello Pin
Ravi Bhavnani28-Aug-12 5:26
professionalRavi Bhavnani28-Aug-12 5:26 
Questionhow to store datas in excel. Pin
Anusha Sridhar28-Aug-12 0:09
Anusha Sridhar28-Aug-12 0:09 

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.