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

3
votes
0answers
19 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
65 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
52 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
79 views

Paste from Excel to DataGridView

I have this code that helps me to paste data from an Excel file to a Datagridview: ...
2
votes
1answer
39 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
788 views

Give me thy name, I'll invoke thee

This generic function invokes a property of a given object by name: ...
4
votes
1answer
41 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
66 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
423 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
102 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
109 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
63 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
34 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
25 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
118 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
225 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
36 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
43 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
187 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
39 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
129 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
102 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
48 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
150 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
74 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
69 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
72 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
300 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
81 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
266 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
72 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
299 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
0answers
78 views

Global Modal User Alerts in ASP.NET from masterpage [closed]

I'm working to implement global alerts by which they reside on the master page, and can be called from both content pages as well as user controls. I'm having an issue with the latter. The goal is to ...
3
votes
1answer
61 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 ...
3
votes
2answers
239 views

Checking if an array is initialized and allocated in VB.NET

I am creating an add-in for a piece of software our company uses, so I'm working pretty extensively with that program's API. There are many COM object members which return or contain an array that I ...
6
votes
2answers
130 views

Get list from database in 3 layer model

I'm working on some testing project. For some reason I think I'm doing something wrong with the architecture. I have a simple example to show what I mean. Database class ...
8
votes
3answers
153 views

Automatic variable generation from data table

I am adjusting Fast Report to create some reports, and I have created a loop that runs through query results stored inside a datatable and assigns each TenantName ...
3
votes
1answer
83 views

Checking whether a table has modified rows

The company I am with has a lot of old code migrated over from ALPHA Basic, written back in the 1980s. As development languages have evolved (should I say, "died off"?) the code has been migrated to ...
2
votes
2answers
72 views

Java hashCode method in VB.NET

The point of this method is to emulate Java hashCode(). In order for this to work the project must have arithmetic overflow allowed under: project --> compiler ...
2
votes
1answer
145 views

Vulnerability of Encryption class using AES + HMAC

I've written an encryption-decryption class that is to be used in my companies commercial web application that will handle sensitive information. The encrypted data will be passed over the internet ...
4
votes
0answers
184 views

Swapping Tab Order

The code I have below swaps two tabs around. This is done through creating an array, deleting all tabs and then recreating them which seems very inefficient to me. ...
10
votes
1answer
385 views

Rendering an HTML form based on a specification in a string

Here's a brief explanation of my method: Provide a string and parse it to HTML code respecting a specific format. The accepted format is: For dropdown menu : Test DropDown~Select:Options1; ...
5
votes
3answers
101 views

Userform that calculates gas mileage

I created a project for a programming class that asks you to make a userform in Visual Studio that calculates mileage, given the user inputs of gallons of gas consumed and distance traveled. The code ...
4
votes
2answers
81 views

Creating a wrapper for SqlClient

I'm trying to find out what is the best way to create a class so I can use it to connect to the SQL Server and be able to rollback everything if a single error exists. Right now, I'm using a single ...
4
votes
2answers
162 views

De-serializing and serializing objects to be sent over the network

I am serializing and de-serializing a class object within the class which is then sent over the network like this: ...
2
votes
2answers
137 views

Performance of MySQL helper class for VB.NET

I have inherited this code from my company. It is acting as a helper class for a database and written in VB.NET until date. It is working properly and almost 5 to 10 commercial packages I am ...