Skip to main content
21 votes

Search a big (13 GB) Outlook PST file

I would assume that this ...
Heslacher's user avatar
  • 50.4k
17 votes

Search a big (13 GB) Outlook PST file

COM interop is in itself a performance hit, but even when accessing it through COM (e.g. in VBA), the Outlook type library / object model is notoriously, painfully slow. If performance is a ...
Mathieu Guindon's user avatar
9 votes

Download Images as fast as possible

Just a few quick remarks (for now): vbNullString is a remnant of VB6 (which I think would be under the ...
Mathieu Guindon's user avatar
9 votes
Accepted

The Never-Ending IFs

Your ConfigureApplicationAsync method calls 9 async methods in a predefined sequence (which might be too much responsibilities for a single method btw). Each of the ...
Peter Csala's user avatar
  • 9,279
8 votes
Accepted

ROT13 encoder/decoder

The number one problem here is that you concatenate translated letters on to your string one at a time. Since strings are immutable in .NET (and most right thinking languages), this means for the ...
Rafe's user avatar
  • 1,360
7 votes
Accepted

Fizzbuzz of course

You said beginner, which is good. I'm going to go into a few basic VB.NET constructs that should help you, and then cover a couple advanced ones in detail so that hopefully it's useful for future ...
Der Kommissar's user avatar
6 votes

Fizzbuzz of course

First, I would change the way you styled the if statements. Generally the less nesting you have the better. I would go with the more simple: ...
yitzih's user avatar
  • 545
6 votes
Accepted

Update 12 records in a database table in less than 13 queries

...
Mathieu Guindon's user avatar
6 votes
Accepted

Detect file type using file signatures

Your first step is to wind your thinking back a few steps and re-approach your code with a fresh line of thinking. Looking at your code, you say "to detect the real file type of a given file" but you ...
AJD's user avatar
  • 2,346
6 votes
Accepted

Convert integer to full text string duration

You should look into the TimeSpan struct, which provides a nice method TimeSpan.FromSeconds(). Having filled a ...
Heslacher's user avatar
  • 50.4k
6 votes
Accepted

Parse floats to a custom numeric format string

Welcome to Code Review! Nice first question. Instead of using Instr() to check if stringNum contains a ...
Heslacher's user avatar
  • 50.4k
5 votes
Accepted

Removing XML Doc Comment Nodes

public abstract override ImmutableArray<string> FixableDiagnosticIds { get; } What is the reason for this line? You ...
svick's user avatar
  • 24.3k
5 votes

Fizzbuzz of course

Just a couple of things to add to what @yitzih has already suggested: Watch your imports Try not to have imports in your code that you don't need. For example, in the code you've posted you've ...
forsvarir's user avatar
  • 11.7k
5 votes

Simple property formatting

My VB.NET is incredibly rusty but you should write a separate function: ...
Adriano Repetti's user avatar
5 votes
Accepted

Create URL query string from dictionary

This isn't a bad approach - simple, effective, and gets the job done. It could be ever-so-slightly better, though. First, string concatenation (str1 & str2, <...
Der Kommissar's user avatar
5 votes

Warehouse/store management tool

so first thing I would say to you is Don't use Goto's Second thing Don't swallow Exceptions You also are using C# comment indicators when you should be using an apostrophe to illustrate some of ...
Malachi's user avatar
  • 28.6k
5 votes

AES File Encryption / Decryption

Security is hard. The recommended approach to implementing anything crypto related is let someone else do it! When I first thought, before reading the code, that you were actually trying to implement ...
Josiah's user avatar
  • 6,006
5 votes
Accepted

Use a delegate to assess equality

GetHashCode will mostly be used in collections using hash tables internally, like dictionaries or hash sets. If you know that you are only going to test for ...
Olivier Jacot-Descombes's user avatar
5 votes

Read an image file as greyscale byte array

Separating UI from business logic You have put everything into the button click event handler. This is really bad practice. Consider creating a separate class to handle the image processing: ...
jdt's user avatar
  • 2,362
4 votes
Accepted

AES encryption/decryption using pure .NET and streams

Let's talk about your code then we'll talk about that paragraph of text you have. First off: ...
Der Kommissar's user avatar
4 votes
Accepted

How to avoid code duplication in ordering system

You are right that you have code duplication where no duplication should be. As far as I can see from the code you have posted, nothing really changes if you would write a class that would handle it ...
Icepickle's user avatar
  • 825
4 votes

Building a very basic calculator

Welcome to the world of OOP — hopefully there are a few things we can teach you. ;) I'm going to show you an alternative implementation first, to help you see how OOP truly should be used, then ...
Der Kommissar's user avatar
4 votes

Inputting 10 numbers in an array

Repetition. Always a sign that something could be improved. DRY (Don't repeat yourself) is the mantra here. Magic Numbers. Passable for one-off code, but can get in the way if you wish to maintain or ...
AJD's user avatar
  • 2,346
4 votes

Detect file type using file signatures

IO.File.ReadAllBytes(file) seems like overkill. Most file formats have signatures that appear within the first few kilobytes. There are, however, signatures where ...
200_success's user avatar
4 votes

The Never-Ending IFs

You have two issues here, the first one is that you should invert the condition for early return, which would decrease the nesting levels. The second issue is understanding the related executions and ...
iSR5's user avatar
  • 5,338
3 votes
Accepted

Raise a list of integers to powers and return uniques

Use a Hashset This seems to be a more intuitive data structure to use since you need all of your values to be unique. The code would change very little, but you ...
yitzih's user avatar
  • 545
3 votes
Accepted

Security check using an SQL call

It needs more Using statements. For example: ...
Slai's user avatar
  • 232
3 votes

Take input of delimited file of integers and output result

You undoubtedly have this line at the top of your code file: Imports Microsoft.VisualBasic Remove it, and your code stops compiling. Why? Because you're using ...
Mathieu Guindon's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible