Quantcast
Channel: Everyday I'm coding » vb.net
Browsing all 10 articles
Browse latest View live

What is the purpose of a stack? Why do we need it? (MSIL)

So I am learning MSIL right now to learn to debug my C# .NET applications. I’ve always wondered: what is the purpose of the stack? Just to put my question in context: Why is there a transfer from...

View Article


Image may be NSFW.
Clik here to view.

Getting the closest string match

I need a way to compare multiple strings to a test string and return the string that closely resembles it: TEST STRING: THE BROWN FOX JUMPED OVER THE RED COW CHOICE A : THE RED COW JUMPED OVER THE...

View Article


How do you get a string from a MemoryStream?

If I am given a MemoryStream that I know has been populated with a String, how do I get a String back out? Solution: This sample shows how to read and write a string to a MemoryStream. static void...

View Article

Is there a conditional ternary operator in VB.NET?

In Perl (and other languages) a conditional ternary operator can be expressed like this: my $foo = $bar = $buz ? $cat : $dog; Is there a similar operator in VB.NET? Solution: Depends. The If operator...

View Article

When should I use a List vs a LinkedList

When is it better to use a List(Of T) vs a LinkedList(Of T)? Solution: I know this answer is late but I found interesting results // temp class to show example class Temp { public decimal A, B, C, D;...

View Article


.NET Configuration (app.config/web.config/settings.settings)

I have a .NET application which has different configuration files for Debug and Release builds. E.g. the debug app.config file points to a development SQL Server which has debugging enabled and the...

View Article

Problems with adding to SQL Server database on vb 2008

I am having a problem but don’t know exactly what is wrong with it my code is below: Imports System.Data.SqlClient Imports System.Data Public Class FormAdd Private Sub btnBack_Click(ByVal sender As...

View Article

Why C# fails to compare two object types with each other but VB doesn’t?

I have two objects in C# and don’t know if it’s Boolean or any other type. However when I try to compare those C# fails to give the right answer. I have tried the same code with VB.NET and that did it...

View Article


Use Float or Decimal for Accounting Application Dollar Amount?

We are rewriting our legacy Accounting System in VB.NET and SQL Server. We brought in a new team of .NET/ SQL Programmers to do the rewrite. Most of the system is already completed with the Dollar...

View Article


Strange behaviour of the If() statement

today I stumbled upon a strange behaviour of the VB.net If() statement. Maybe you can explain why it is working like it does, or maybe you can confirm that it is a bug. So, I have a SQL database with a...

View Article
Browsing all 10 articles
Browse latest View live