Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
QuestionHow calculate Checksum for barcode code128 auto? Pin
Le@rner29-Oct-17 20:01
Le@rner29-Oct-17 20:01 
AnswerRe: How calculate Checksum for barcode code128 auto? Pin
Richard MacCutchan29-Oct-17 22:27
mveRichard MacCutchan29-Oct-17 22:27 
AnswerRe: How calculate Checksum for barcode code128 auto? Pin
Sascha Lefèvre29-Oct-17 22:27
professionalSascha Lefèvre29-Oct-17 22:27 
QuestionNo overload for method, error in c# file for Unity. Pin
Member 1349123628-Oct-17 14:33
Member 1349123628-Oct-17 14:33 
AnswerRe: No overload for method, error in c# file for Unity. Pin
Sascha Lefèvre28-Oct-17 14:47
professionalSascha Lefèvre28-Oct-17 14:47 
PraiseRe: No overload for method, error in c# file for Unity. Pin
Member 1349123628-Oct-17 15:25
Member 1349123628-Oct-17 15:25 
QuestionC# Problem extracting file from .zip created with DotNetZip Pin
manic_drummer28-Oct-17 11:58
manic_drummer28-Oct-17 11:58 
AnswerRe: C# Problem extracting file from .zip created with DotNetZip Pin
Sascha Lefèvre28-Oct-17 13:35
professionalSascha Lefèvre28-Oct-17 13:35 
I haven't used DotNetZip yet but there are some things catching my eye, the first one most likely being the culprit (even though "don't seem to execute" isn't very specific Poke tongue | ;-P ).

This:
C#
Path.ChangeExtension(strTempPath, ".bin");
..does nothing for you. You most probably intended this:
C#
strTempPath = Path.ChangeExtension(strTempPath, ".bin");
Strings are immutable. When using a method that "modifies" a string you always have to use the returned version.

Most probably this line fails then:
C#
e.Extract(strTempPath, ExtractExistingFileAction.OverwriteSilently);
..because strTempPath is still the name of the directory.


Other observations:

You're not enclosing your streams in using-blocks. Probably not the cause of your problem here but I strongly advise you to always do that. I've seen funny things happening when not doing that, which do not always immediately reveal themselves as stream issues and send you on a wild goose chase.

Don't use the same variable once for a directory name and then for a file name. It was confusing to read and I bet it will confuse you too, when you read your code again after doing different stuff for a while.

And a style suggestion: Don't use Systems Hungarian. It's not recommended by Microsoft, for a good reason, I think. If you're interested: Making Wrong Code Look Wrong – Joel on Software[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

AnswerRe: C# Problem extracting file from .zip created with DotNetZip Pin
Bernhard Hiller30-Oct-17 4:18
Bernhard Hiller30-Oct-17 4:18 
Questionc#Move music files in listbox up or down Pin
Member 1348924427-Oct-17 5:00
Member 1348924427-Oct-17 5:00 
AnswerRe: c#Move music files in listbox up or down Pin
Richard MacCutchan27-Oct-17 5:11
mveRichard MacCutchan27-Oct-17 5:11 
GeneralRe: c#Move music files in listbox up or down Pin
Member 1348924427-Oct-17 5:18
Member 1348924427-Oct-17 5:18 
GeneralRe: c#Move music files in listbox up or down Pin
Richard MacCutchan27-Oct-17 5:51
mveRichard MacCutchan27-Oct-17 5:51 
GeneralRe: c#Move music files in listbox up or down Pin
Member 1348924427-Oct-17 6:18
Member 1348924427-Oct-17 6:18 
GeneralRe: c#Move music files in listbox up or down Pin
Richard MacCutchan27-Oct-17 6:42
mveRichard MacCutchan27-Oct-17 6:42 
SuggestionRe: c#Move music files in listbox up or down Pin
Ralf Meier28-Oct-17 12:20
mveRalf Meier28-Oct-17 12:20 
GeneralRe: c#Move music files in listbox up or down Pin
Richard MacCutchan28-Oct-17 22:08
mveRichard MacCutchan28-Oct-17 22:08 
AnswerRe: c#Move music files in listbox up or down Pin
jschell27-Oct-17 7:39
jschell27-Oct-17 7:39 
AnswerRe: c#Move music files in listbox up or down Pin
Gerry Schmitz28-Oct-17 3:31
mveGerry Schmitz28-Oct-17 3:31 
Questionc# Need to be able to play music files that were additional items to the list box Pin
Member 1348924427-Oct-17 3:52
Member 1348924427-Oct-17 3:52 
AnswerRe: c# Need to be able to play music files that were additional items to the list box Pin
OriginalGriff27-Oct-17 3:57
mveOriginalGriff27-Oct-17 3:57 
AnswerRe: c# Need to be able to play music files that were additional items to the list box Pin
Richard Deeming27-Oct-17 4:04
mveRichard Deeming27-Oct-17 4:04 
GeneralSOLVEDRe: c# Need to be able to play music files that were additional items to the list box Pin
Member 1348924427-Oct-17 4:18
Member 1348924427-Oct-17 4:18 
AnswerRe: c# Need to be able to play music files that were additional items to the list box Pin
Gerry Schmitz27-Oct-17 4:26
mveGerry Schmitz27-Oct-17 4:26 
QuestionExporting result to .csv format instead of .xlsx without using interop.excel Pin
Ratsr26-Oct-17 23:54
Ratsr26-Oct-17 23:54 

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.