All Questions
42 questions
1
vote
4
answers
628
views
How can I keep accurate time in a Windows Forms (WinForms) application?
I am an inexperienced developer fresh out of college. I was handed a Windows Forms Application to work on.
The application previously relied on system time. They wanted me to make it so that we could ...
3
votes
5
answers
3k
views
Convert a team from VB.Net to C#.Net
I am currently running a team of 5 VB.Net developers and have decided to make a switch to C#. The team builds and maintains around 20 different applications that run our whole platform, so the code-...
0
votes
3
answers
4k
views
Is a singleton with an update method and software state verification a valid pattern?
Stack overflow suggested that this question my be better suited here. I normally work in c#, but I'm working in a vb.net net application currently. So feel free to respond with vb.Net or c#...
...
0
votes
3
answers
9k
views
Best way to query data from database and then modify it
I'm working on a software using VB.Net which retrieves string packets through a TCP socket. The problem is it receives hundreds of packets per second. For each incoming packet the software should ...
1
vote
2
answers
222
views
Visual Basic Writing to File with Numbered Lines
This is more of a design/user experience kind of question, so if it belongs somewhere else please let me know.
I have a program that has multiple PictureBoxes:
PictureBox1
PictureBox2
.
.
...
1
vote
4
answers
1k
views
How do I elegantly store tabular data in code?
Let's say I want to store date which cannot be changed by the user in code. For example, my application supports ten types of reports, and I want to store metadata about it. Usually, I'd use a ...
2
votes
1
answer
2k
views
Standard way to call virtual method
So recently I was working on a project where I had a base class that provided some common functionality. It had several virtual (overridable in vb) functions. I noticed that some of these methods ...
4
votes
3
answers
1k
views
C#/VB struct – how to avoid case with zero default values, which is considered invalid for given structure?
How to implement some constrained .NET struct/structure (let's say LimitedString), where its state with default values (set by CLR to technical defaults, i.e. nulls, zeros, etc.) should be prohibited ...
83
votes
4
answers
47k
views
Should we include the NuGet PACKAGE folder in version control?
In a C# or VB.NET project, should we include the PACKAGE folder (NuGet package folder that is created in the root of my project that contains the nupkg files and other content) to our source control ...
1
vote
0
answers
80
views
Metrics for when to use a hash value?
I am working on a project that requires a series of flat files. I will be doing some data checking against simple date like:
ID;StatusCode
So a typical file might be like:
13993;R
38293;A
19349;I
...
6
votes
3
answers
5k
views
Saving to Registry vs. CustomFile [closed]
I've been using the usual My.Settings... method when it came to saving settings for my program but I was just wondering, If I wanted to save program settings into the Registry and load those settings, ...
1
vote
2
answers
4k
views
DLL or web service for common functions?
We have a variety of basic functions (date utilities, email sending, internal math calculations, etc) that are currently in an old VB.NET project.
We're going to move towards C# and I'm wondering if ...
3
votes
1
answer
207
views
How to design similar purpose static methods
I know that you cannot override static functions, but for what I'm looking to do, it seems like the logical way to design my class.
I have a method that is associated with my abstract class, that i ...
1
vote
1
answer
3k
views
.NET WCF: Persistent connection or Open/Close as needed?
I have a .NET WCF web service currently running in production right now. I would say 95% of the time it works flawlessly and as intended. However; there are times when I am throwing an exception that ...
4
votes
1
answer
2k
views
What language is better for working with databases? [closed]
I am going to develop a software that works with different databases and I'm considering whether to use .NET languages or C++. I've known that .NET features LINQ and ADO.NET but are there features ...
0
votes
1
answer
942
views
Are VB.NET and C#.NET projects created from Microsoft Visual Studio "Open Source" safe? [closed]
I'm developing software in VB.NET and C#.NET and planning to release their source codes as fully open source. Are these projects "open-source" safe?
My doubts are:
VB.NET and C#.NET are using the ....
0
votes
0
answers
773
views
Managing child worker thread list
After so much research, I thought I should ask the experts.
I am working on a project for my corporate employer, we have android and iPhone mobile apps that make request to a web service, the request ...
1
vote
2
answers
959
views
IL and case-sensitivity
Quoted from A Brief Introduction To IL code, CLR, CTS, CLS and JIT In .NET
CLS stands for Common Language Specifications. It is a subset of CTS.
CLS is a set of rules or guidelines which if ...
1
vote
1
answer
1k
views
Should I just always Convert.ToInt32 my integers to account for potential nullable integers?
If my MSSQL database contains a data type that is NULL (i.e. null is allowed) then ORMs, such as EntityFramework in my case, create .NET objects that are nullable.
This is great, and the way I use ...
1
vote
1
answer
3k
views
How can you denote the access modifiers "friend" and "protected friend" in UML?
The symbols for access modifiers that I know are relevant for many different languages:
public: +
private: -
...
6
votes
2
answers
2k
views
COM INTEROP Support - which is better? C# or VB
I keep hearing that c# is "better" than vb... but as far as I can see, aside from syntactical differences, both compile down to the same IL. I've found some good articles by googling that explain what ...
4
votes
6
answers
13k
views
How get and set accessors work
The standard method of implementing get and set accessors in C# and VB.NET is to use a public property to set and retrieve the value of a corresponding private variable. Am I right in saying that ...
17
votes
3
answers
5k
views
Naming Convention for Dedicated Thread Locking objects [closed]
A relatively minor question, but I haven't been able to find official documentation or even blog opinion/discussions on it.
Simply put: when I have a private object whose sole purpose is to serve for ...
7
votes
2
answers
1k
views
.Net Language Interoperability Gotchas [closed]
I hope this is the appropriate forum to ask this question.
A group of colleagues and I just starting learning C# a few weeks ago and we are planning on having a discussion about language ...
2
votes
4
answers
913
views
Do I lose anything by coding in c# and using free online vb.net code convertors? [closed]
The company I work for uses vb.net since there are many programmers who moved up from vb6 to vb.net. Basically more vb.net resources in the company for support/maintenance vs c#. I am a c# coder and ...
4
votes
7
answers
4k
views
Changing from VB.NET to C#? [closed]
I am working on co-op at a company as a test engineering specialist. This is not technically a software job, however at the end of the day, I spend most of my time programming.
I am not a ...
9
votes
7
answers
52k
views
string.format with variables vs inline variables
What are the pros/cons (if any) to using
string output;
int i = 10;
output = string.Format("the int is {0}", i);
versus
string output;
int i = 10;
output = "the int is " + i;
I have always used ...
4
votes
2
answers
3k
views
Bill of materials database design in EF codefirst?
I'm having trouble generating a proper database design for bill of materials in EF Code-first
I just need a general structure then ill add additional fields
So i need to have a Product that is ...
-1
votes
6
answers
566
views
Should I open up to .net, c# and visual basic? [closed]
I am a huge linux fan and have been ignoring .net, C#, and visual basic due to their relationship with Microsoft. Am I foredooming them just for their relationship?
Is there any advantage to ...
1
vote
2
answers
2k
views
Why should company choose VB.NET over C# [duplicate]
Possible Duplicate:
VB.Net vs C# debate
Are there any actual reasons why company should choose VB.NET over C#?
I work for a company which develops medical software and switched from VB6 to VB....
0
votes
4
answers
956
views
.Net - web controls and win form controls
The next version of the application will be a .NET based application (both desktop and web). The requirement is that both applications have to look and work exactly the same way. I was thinking that ...
12
votes
6
answers
4k
views
any document which says exactly what range of numbers are .NET BigIntegers designed for?
I'm playing around with the .NET BigInteger and basically I'm wondering what number --an estimated answer would be fine-- is the point of deviation of the curve of (the graph of (increase of time ...
4
votes
10
answers
1k
views
How to experience gradual improvement of knowledge while a newbie does .NET maintenance programming? [closed]
I started my career as a software developer about 6 months ago. This is my first job, and I am the only developer in this company. I gained .NET knowledge by self study and also by doing some ...
4
votes
3
answers
3k
views
Architectural Patterns for a Game
So I've got a solution that contains a few big projects, which I'm trying to break down into smaller projects with more isolated responsibilities. This is a game I'm tinkering with -- I'm mainly a LOB ...
4
votes
4
answers
3k
views
Is function memoization really only for primitives?
I was thinking about this for quite some time. Is function memoization really only for primitives?
I currently have this piece of code:
Public Shared Function Mize(Of TArg1 As Structure, TResult)(...
59
votes
7
answers
203k
views
.NET Properties - Use Private Set or ReadOnly Property?
In what situation should I use a Private Set on a property versus making it a ReadOnly property? Take into consideration the two very simplistic examples below.
First example:
Public Class Person
...
1
vote
3
answers
536
views
Addressing a variable in VB
Why doesn't Visual Basic.NET have the addressof operator like C#? In C#, one can
int i = 123;
int* addr = &i;
But VB has no equivalent counter part. It seems like it should be important.
...
6
votes
2
answers
3k
views
How would you TDD the functionality of getting the corresponding process of a running windows service?
Purpose
Over the last year or more I've been learning unit testing via books I've read recently like The Art of Unit Testing, Working Effectively with Legacy Code, and others. I've also been using ...
14
votes
16
answers
1k
views
Should a c# dev switch to VB.net when the team language base is mixed?
I recently joined a new development team where the language preferences are mixed on the .net platform.
Dev 1: Knows VB.net, does not know c#
Dev 2: Knows VB.net, does not know c#
Dev 3: Knows c# and ...
11
votes
10
answers
10k
views
How do I explain to non-programers what .NET is? [closed]
I don't work at a software company, and I'm one of a small handful of people in the company that know anything about programming. I spend a lot of time automating other programs that are used in the ...
17
votes
20
answers
19k
views
VB.Net vs C# debate [closed]
I've been in workplaces where, at the start of a project, the "Should we use VB.Net or C#" question has been raised.
Granted, it's probably less common to have to make that decision now than it was ...
28
votes
22
answers
65k
views
Why is VB so popular? [closed]
To me, Visual Basic seems clumsy, ugly, error-prone, and difficult to read. I'll let others explain why. While VB.net has clearly been a huge leap forward for the language in terms of features, I ...