Visual Basic .NET (VB.NET) is an object-oriented computer programming language that can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft .NET Framework.

learn more… | top users | synonyms

4
votes
0answers
19 views

implementing a StringEnum

this is to be used like an Enum (as parameter mostly), but for string using .net 3.5 Actual Implementation ...
1
vote
1answer
33 views

Private method to validate Excel header

I am new to unit testing and I am unsure how to design classes that use third party libraries, so that I can easily test them. The example I'll use is with EPPlus-...
0
votes
0answers
12 views

vb.net external updater, help to publish the code?

I've created little block of code that should update a external program, but I've checked it through and have not seen possible error or warnings. There are no errors in my testing but I wan't to ...
1
vote
0answers
18 views

Get percentage on the fly with AND and LIKE

Aim: Get percentage based on if field is blank or not Issue: Unknown amount of variables based on search and thus speed Solution: Dynamic SQL build up Looking for: Tips to speed up even more/spot ...
1
vote
2answers
50 views

Reading CSV files and inserting in a SQL database in VB.Net

This program reads all files in a folder and subfolders line by line, converts them in a supported character set, replaces all unsupported characters and inserts them in a SQL database. My idea was to ...
12
votes
1answer
106 views

.NET 4.5 licensing subsystem using RSA-4096 strong name key, SHA256 signed XML, and assembly signature enforcing

Abstract For the past week I have been looking at taking advantage of the .NET 4.5 improvements to code signing and XML signing to produce a licensing subsystem I can use to license my own products. ...
3
votes
0answers
25 views

Event-driven UDP listener wrapper

I wrote this wrapper around the UdpClient,using events for new datagrams: ...
1
vote
0answers
41 views

Making a TV guide from XML file

I have a background worker that is RunWorkerAysnc() on form load with the following code in it: ...
2
votes
0answers
30 views

Queries within transaction

I am almost finished with my queries which are running inside transactions so it's everything or nothing... Could you please take a look if I am missing something or if everything is where it belongs? ...
4
votes
1answer
30 views

A class (actually a structure) to help decode an HRESULT

HRESULTs are the common way for Microsoft technologies like COM and Win32 to return either an error code or messages that mean a specific type of success. They are usually returned as the result of a ...
5
votes
1answer
102 views

Matrix rotation

Continuing on my VB.NET quest, I came across this slightly more challenging problem. You are given a 2D matrix, a, of dimension \$M\$x\$N\$ and a positive integer \$R\$. You have to rotate the ...
3
votes
1answer
51 views

HackerRank ACM ICPC Team

You are given a list of \$N\$ people who are attending ACM-ICPC World Finals. Each of them are either well versed in a topic or they are not. Find out the maximum number of topics a 2-person team can ...
2
votes
1answer
61 views

Displaying a currency value

When a user clicks on "Case", it pops up a box where they have to input a number, which is later used to calculate the value to Euro and around to other values. After this, it checks which value is ...
3
votes
0answers
42 views

Web API 2 Controller for third party services for multiple organizations

I'm putting together some RESTful services using ASP.NET Web API. This is the first time I have done this, so I'm looking for general feedback on this controller to make sure I'm not doing anything ...
3
votes
1answer
75 views

Creating a lightweight strongly-typed parameter infrastructure

I'm looking for some feedback on some code, designed to allow me to strongly-type parameters, which get passed to functions. I'm only really looking for comments on making my parameters more strongly ...
3
votes
2answers
92 views

C#/VB.Net Runtime Controls

Question: Is there a way to more efficiently or more readably write a loop that creates multiple types of controls? Background I've been trying to learn C# by converting some of my older VB.Net ...
5
votes
1answer
139 views

Paste from Excel to DataGridView

I have this code that helps me to paste data from an Excel file to a Datagridview: ...
1
vote
1answer
55 views

SQL Inserting up to 10'000 records from a table to a secondary table

I'm relatively new to ASP.net and working with larger data sets as a fresh graduate, and I am currently maintaining/developing for an ASP webform and T-SQL system at the moment where we have a ...
11
votes
3answers
798 views

Give me thy name, I'll invoke thee

This generic function invokes a property of a given object by name: ...
4
votes
1answer
44 views

Find and extract delimited packet in buffer

I'm writing in VB.NET, using VS Community 2013. I don't know much about this language. I have managed to make my code work, but I suspect it is possible to improve the code a lot. This code ...
6
votes
1answer
106 views

Function that recursively downloads entire directory is slow

I created this function to recursively copy an entire directory from an FTP server. It works just fine except that it is about 4 times slower than using FileZilla to do the same operation. It takes ...
8
votes
2answers
1k views

VB.NET code to AES encrypt and decrypt

I wrote this for use internally at work and have never worked with encrypted data before, so can you please critique? It's written in VB.NET which I have decent experience in, just not the encryption ...
2
votes
1answer
112 views

Creating a user registration form

How should I go about creating a registration page in Windows forms? I can easily create a registration page, but I'm not sure if it's the best way. I'd have a service account that is hard coded, and ...
2
votes
2answers
116 views

Checking for violation of primary key in a DataTable

I coded this function to check for a violation of a primary key in a DataTable. The main idea is to retrieve a list of every row that the same value of the column ...
2
votes
1answer
82 views

Calling getter or setter with expression tree

I have some part of my code that uses reflection and there is some slowdown issue that I have to fix. After some research I found that expression tree seem to be a good candidate to fix it also it ...
0
votes
1answer
41 views

Multi-layer Application Configuration

Context: The following code is used to look up a setting values based on multiple layers of configuration within the application. For any given setting (ie: default printer), the application can be ...
1
vote
1answer
56 views

Custom DataGridViewColumn to replace a DataGridViewComboBoxColumn

The issue that i'm trying to fix with this code is simple I have a huge dataset and I have to bind it (as readonly) to a DataGridView In that dataset I have some ...
3
votes
1answer
128 views

Downloading HTML documents from the web

In this project I'm working on, I need to extract articles text from their original HTML document. This class, HtmlConnection, receives the URL of the article, and ...
6
votes
1answer
232 views

Regular Expression matching customer number strings

Using VB.NET, I have created an AddIn for Autodesk Inventor and the customer has a bunch of drawing number strings which follow this sort of scheme: ...
1
vote
1answer
37 views

Retrieving a list, by iterating through a list

I'm using VB.Net, MVC 5, EF 6, and Linq. I have a list of Integers (category attribute IDs). I need to create a second list of ...
6
votes
1answer
47 views

Login validator class

I'm trying to learn more about object oriented programming and I have a few questions about the class below. I'm working in Visual Basic.NET My questions are Is there a better place / way to show ...
5
votes
1answer
201 views

Early Binding with Generics

I have a class which takes the method address and arguments, and executes it later when told to do so. ...
0
votes
1answer
44 views

MVC.Net View Model

I'm nearing the end of my first MVC project which uses VB.Net and MVC5. I've started writing all my view models in a very similar fashion. This has been working well for me, but being the first ...
0
votes
1answer
32 views

CSV Creation from two tables with URL for user to click on

The code works but with an increase in data it's now slower so needs a tweak so looking for pointers. ...
8
votes
2answers
132 views

Searching string for character not in array

I have a string which I want to check for characters other than those in this list {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ".", "i"} however this check gets run several thousand times a ...
-1
votes
2answers
105 views

In VB.NET, does assigning a collection to a variable make a For-Each loop more efficient? [closed]

I have chosen two options for looping through files in a directory. Let me know which one is more efficient (in speed/memory and GC). Option 1: (collect the file name in an array and loop through it) ...
2
votes
1answer
57 views

Performance improvement on vb.net code

I need to write 5 crores records with 72 columns into text file, the file size is growing as 9.7gb . I need to check each and every columm length need to format as according to the length as defined ...
12
votes
1answer
198 views

Remove Empty Argument Lists from Attributes

I converted a C# analyzer for removing empty argument lists from attributes to be a C# and VB.NET analyzer: ...
6
votes
2answers
75 views

Calling functions with different variable types

I need to call the function that will get the value of a datatable cell with the ColIndex, either a text (column name) or an integer (...
5
votes
1answer
75 views

Generating controls based on PropertyInfo

This is a class that takes a PropertyInfo and makes a Control for it. You can access the value of the control through a property on the class called Value. ...
5
votes
2answers
95 views

Modified TextBox for forms generating SQL statements

An overview of what I've done: I've inherited System.Windows.Forms.TextBox and added a few properties to help me out in creating forms that generate SQL ...
7
votes
3answers
307 views

Data Access Layer

This code review request is regarding data access layer coding. I have used the method I am about to describe in a few smaller applications, but I am noticing limitations that I would like to avoid in ...
2
votes
1answer
97 views

LINQ queries to fetch first and last name

I have these two queries and they work just fine. I use the values they retrieve to populate a title for a view in my application. It seems though that I should be able to accomplish this with one ...
4
votes
3answers
443 views

Solidworks EPDM add-in

I need to expand the functionality of this project to encompass more commands (you may notice in GetSelectedFilePaths() I have a case that is not currently used, ...
1
vote
1answer
42 views

Authentication management

I have the following code and I think it's almost impossible to read and to maintain. I prefer self-explaining and modular code where variable and function names tell what I'm trying to do, but I ...
3
votes
1answer
94 views

Unit testing a service to return items from a database

I have been a developer for many years and get core development concepts, as well as unit testing ones such as DI/Ioc, Mocking etc. I also understand the values, importance of unit testing and writing ...
1
vote
1answer
31 views

Getting a table from an Excel worksheet

I need to get a table from an Excel worksheet. Sometimes I know the worksheet that contains the table, other times I might know it's going to be in one of a handful of worksheets, and still other ...
2
votes
2answers
59 views

Custom SQL statement

I am just wondering if my code can still be simplified. I intend to make it reusable in all update statements. ...
4
votes
2answers
603 views

Storing data into an SQL table using multiple threads and queues

I have a process running in a separate thread which reads data over Ethernet and raises an event for each read. Then, this data is processed over a tree of classes. At the top of my class tree, I want ...
3
votes
1answer
63 views

Web link parser that hunts for a specific string

This handles a parsing system to look at every users profile page and determine their job classification based on the class of a div element. I noticed that the class was always consistent on specific ...