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

0
votes
0answers
19 views

Problems implementing Runge Kutta to solve a Damped Pendulum [closed]

I am a high school student working on a "home project" to animate a damped pendulum by solving the following differential equations using the Runge Kutta method. $$ \begin{aligned} ...
7
votes
3answers
73 views

Recursive filename search

I have created a little program to search a set of folders holding documents scanned. The folder structure is as follows: c:\images\year\month\date\documenttype\firstpartofdocumentNo.\ the ...
2
votes
0answers
44 views

Populating fields from stored procedure

I was just wondering if my code below is a good way of populating data from database. I have had no issues with this really but I am being taught this and just wondering if it is the best practice. ...
6
votes
2answers
406 views

Making error messages more efficient

I am using a way of making error messages, and it works fine. It is just starting to get a little annoying as my project gets larger. I was wondering if there was a way to do with with out having to ...
4
votes
2answers
203 views

Performing actions based on command line arguments

I'm currently reviewing a bit of an older console application which performs certain tasks depending on the command line argument that is given. These tasks are called through Windows Task Scheduler. ...
-1
votes
2answers
52 views

Using session values in the body of an email

I created the body of an email by using the following bit of code: ...
2
votes
2answers
174 views

Get alpha numeric count from a string

Following is the code I am using to find a separate count for alphabets and numeric characters in a given alphanumeric string: ...
1
vote
2answers
45 views

Checking consecutive characters in a string

First of all, this code will ask for a number (first) on how many test the user would like to have. Then the user will input the strings depending on how the number entered. ...
3
votes
1answer
38 views

Passing arguments to a SendMail function referenced by addressOf operator

I am trying to send daily mail alert to users based on some timer values. For that I've used Addhandler to call the sendmail() ...
0
votes
0answers
18 views

Calling Stored Procedures vb.net [duplicate]

I have this piece of code for running a Stored Procedure, and I was wondering if there is a way of cutting code like: ...
-1
votes
2answers
62 views

Classifying duration as <1, 1-2, 2-3, or >3 years

How can I refactor this method to look cleaner and free from 2 If statements? ...
5
votes
1answer
51 views

Genetically engineered doodle creatures selector combo

I have created an awesome cheat/fan page for the game Doodle Creatures with the help of some cool people in The 2nd Monitor. Is there anything I can do to improve this code? Here is my ASP.NET ...
4
votes
1answer
57 views

Executing a list of tasks from a database

I have a list of tasks I get from my database (as strings) and then execute. However I'm uncertain on how to implement this correctly. Currently I have implemented this in the following way: ...
3
votes
1answer
102 views

Wait for System.IO.StreamReader.ReadLineAsync

I want to wait for a line to be read, but only for so long before timing out. This is what I came up with. Is there a better way to do it? ...
3
votes
3answers
82 views

Zero pad function trim extra leading zeros

Here is a zero pad function I have: ...
2
votes
5answers
190 views

IIF shortern to one datarow .Net

Is it possible to shorten the Isnull checking? It would be great to shorten this code and only have to put the datarow once. This code imports data details (usually there would be more .x = ...
2
votes
2answers
71 views

Avoid Split to reduce memory press (on servers)

I have a Component that is used for all Active Directory queries. The function below is used heavily perhaps even milions of times each day. Performance is a feature! It's used on servers and I ...
10
votes
1answer
60 views

Autocompleting locations

Can this function be cleaner? It looks to me that I have too much nested stuffs(using+if+while) ...
5
votes
2answers
166 views

Best way to get the list of XML files

I'm a newbie in the use of LinqToXml and I wonder if I can improve this snippet. ...
1
vote
1answer
30 views

Compare strings by custom sort order

Each letter represent a category. Example the group with "M" Code is greater Than "I" and "C" group. "F" is the higher group Here is what I did but I wonder if there is a better way to do it. ...
2
votes
1answer
59 views

Vehicle Loan Calculator

A loan calculator has to be created for the proNetBank. Method of processing the loan is as follows: Vehicle loan is given for a period of three to seven years depending on the customers ...
0
votes
1answer
65 views

Binding controls to properties in ASP.Net WebForms

In my application, we have a number of pages which provide an advanced search capability, with a large number of potential search options (some pages have as few as 3, some as many as 150). The HTML ...
7
votes
2answers
149 views

Checking and updating lines in a file

I am trying to check a bunch of files that should have a leading | delimiter but sometimes don't. If the first line doesn't have the ...
2
votes
1answer
41 views

Implement interface type in implementation of another interface without too much casting

I have a group of tests that must be run in similar (but different) fashion and they have setups, results, etc. which are also similar but different. Great, I thought, I'll use interfaces to define ...
3
votes
0answers
87 views

Parsing small sets of data from a large XML using XMLReader [closed]

Suppose I have a lot of large XMLs I want to parse data from and each of these can range in size from 10MB to well over 300MB. Now, I only need a small sub-set of data from a few specific keys. For ...
11
votes
3answers
222 views

Proper way to validate from sub to sub

I am using a public validating sub to help validate the other subs. Is this the most efficient way to do this? ...
2
votes
1answer
496 views

Calculate percentage of values in an array with a certain condition

I had to write a function that calculates the percentage of values in table less or equal to 2. Is my code right or is there anything missing? ...
4
votes
0answers
143 views

Wrapping a GridView with custom controls

My aim is to create a server control which inherits from a GridView and outputs the basic output wrapped in external markup, including other controls. For example, the output will look something ...
4
votes
1answer
185 views

Using Concurrent Dictionary as First Level Cache

I am currently implementing a thread safe in memory cache mechanism, with the intent of storing objects that are expensive to create or often used by the system. I also want to include expiration ...
5
votes
1answer
262 views

Reading large file, splitting by new line

I am reading a ~120 MB log file (~300 Million lines of text). ...
4
votes
1answer
88 views

Deserialize an email header into key-value pairs

I've created a function that will deserialize an email header into a list of key-value pairs. I've run numerous tests using MS Office Outlook 2010 and MS Office 14.0 Object Library, all of which were ...
2
votes
2answers
202 views

Phone Number Extracting using RegEx And HtmlAgilityPack

I've written this whole code to extract cell numbers from a website. It is extracting numbers perfectly but very slowly, and it's also hanging my Form while Extracting. ...
10
votes
5answers
981 views

Using TryXXX pattern to avoid exceptions

I have been using the TryXXX and GetXXX pattern lately to give clients a choice whether to trap an exception or to read a boolean. An example of this concept would be ...
6
votes
3answers
452 views

Shutdown Delay Program

I wrote this program a while back that would allow me to set a delay, say 3 hours, and when the delay had expired, my PC would turn off. The purpose of it was so I didn't have to leave my PC on all ...
4
votes
2answers
134 views

Evaluating algebra expression using an auxiliary VB class compiled on the fly and consumed in a C# project

I want to create algebra evaluator but I don't want to write my own parser because it takes much time to learn. I don't like algebra expression in C# because it does not look natural compared to VB ...
3
votes
2answers
325 views

Adding string binary numbers

My requirement is to add two binary numbers, say "1001" and "0101" as binary1 and binary2. ...
12
votes
3answers
607 views

Security issues in a SQL query and possible function?

By adding more and more features to my websites, I am now up to 7 different hard coded queries. I have read a lot about SQL injections and possible flaws and security issues, and wanted to make ...
4
votes
1answer
177 views

Filling a table in code behind

I was wondering if there could be an easier or simpler way of filling a table with code behind. So far I have my html/asp.net table : ...
2
votes
2answers
554 views

Extract numbers from an AlphaNumeric string

I have an alphanumeric string like sdff45hg589>@#DF456&<jk778P&&FHJ75, of which I want to extract only the numbers, without using regex or any ...
6
votes
3answers
215 views

Cryptographic Random Number Generator function implementation

While surfing and through some experimentation, I have a new method to generate random numbers without using Randomize or Random ...
6
votes
2answers
354 views

Positive integer to Roman Numeral conversion function

For the past two hours I was searching for a built-in function for converting an integer to an equivalent Roman numeral, but it failed to achieve the target. Hence I wrote my own routine for ...
5
votes
2answers
192 views

Numeric selfmade CAPTCHA in Windows application

Nowadays many sites introduce CAPTCHAs (Completely Automated Public Turing test to tell Computers and Humans Apart) for securing their sites. I wish to introduce the technique in windows forms, as ...
0
votes
1answer
299 views

Is this a better way to validate a text box for mobile number only?

Is this a better way to validate a text box for mobile number only? Validation: allow only numbers will not allow to paste string including characters allow copy from the box length is set to 10 ...
3
votes
2answers
118 views
10
votes
2answers
270 views

Number to Words

I have to convert positive numbers, that are less than 1000, to words. A quick search didn't find anything that looked good to my eye, so I came up with the following. While I was at it I expanded ...
5
votes
2answers
2k views

Set default value for NULL in datatable

I have the following codes, which I created as extension for datatable in my project. It actually worked. Just wonder if there is any optimization can be made through. Thanks. =) ...
2
votes
1answer
98 views

Long list of SQL parameters and audits

Say I have the following code. What are your thoughts on questions 1-4 below? I think it's way too long when I have to list out most of the fields. Is there any better way of doing this? I build up ...
10
votes
2answers
108 views

VBuzz all fizzed up

I don't normally write vb.net code, and I would rather maintain a monstruous vb6 project than a simple vb.net one. There's something about fizzbuzz going on this weekend, that pushed me to write ...
10
votes
4answers
811 views

Splitting company name into 3 strings

I wrote an algorithm which should cut a companies name into 3 strings. Input: 1 String Output: 3 String. Conditions: String 1 2 and 3 shall not be longer then 35 signs. If the Input ...
10
votes
4answers
1k views

Find if value exists using SQL True/False Return

Aim: To Assess if one, or more, examples of a value exists in a Database in the quickest time as I only needs a True/False result. The variable is Alphanumeric. Question: Is this the quickest and ...