All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
3answers
167 views

Is it possible to throw compiler error when attempting to use an unimplemented method?

The backstory is long but the general idea is that I'm beginning an iterative refactoring process to replace a poorly designed data access layer with a new one under constraints from above. We can't ...
2
votes
4answers
1k views

Extension methods vs. Static Class Methods

I've taken on a Visual Studio C# project where my previous colleague used a lot of Extension Methods in static classes over multiple files depending on the uses. In my previous experience I would be ...
3
votes
2answers
3k views

What's the best way to design batch job type processing

I'm working on a portion of an ERP system where I need to process data in a way that's similar to a series of batch jobs, and I'm struggling with deciding the best program architecture to use. I'm ...
1
vote
1answer
108 views

Collection of APIs making up one Application - How to manage?

We have inherited an application that is made up of small .NET web API's. Each API has its own Visual Studio SLN and git repo. All of the APIs are published to one folder ("All") and that folder is ...
0
votes
1answer
469 views

Is my DataAccessLayer well implemented?

I have 3 projects in my solution : An ASP MVC project A console app project A class library project (the DataAccessLayer) I didn't want to recreate an ADO.net entity data model for each project so I'...
15
votes
1answer
14k views

Directory structure for a .NET Solution

We had a contractor visit recently who questioned our methodology of structuring projects. Please note that I am specifically referring to the directory structure. He suggested using the Microsoft ...
1
vote
1answer
382 views

Questions about business logic layer and data access layer in a project

I would separate the BLL from DAL as a best practice. I interact between BLL and DAL via interface. Example: public interface IProductRepository { void Add(Product myProduct); Product Get(...
2
votes
2answers
181 views

How to debug in visual studio 2015 when your web app. need to login via another web app?

My web app (under development) need to login via http://devWebServer/ExtApp/login.aspx After login via address above, it will pass cookie to http://devWebServer/myApp/Login/Default.aspx and continue ...
12
votes
5answers
3k views

Forbid calls to arbitrary functions/classes in external code

I've experienced cases where it would be valuable to restrict access to the API of external libraries and frameworks to prevent negative consequences in the system. For example, in a SharePoint ...
1
vote
2answers
499 views

Working with Fluent API [closed]

I know they can be more natural to write, but I'm finding it conceptually hard to 'read' fluent API method chains. There's so much going on in a couple of lines. As an example from the Nest ...
2
votes
1answer
2k views

How to deploy several Azure Functions with VSTS?

I have created in Azure 2 Azure Functions resources with the following names: FrontApiFunctions PostProcessingFunctions My Visual Studio solutions is like this: AllFunctions.sln |- ...
4
votes
2answers
1k views

IOC Classes are polluting my project

Say I have a C# app, which is layered. I want to test the domain layer independently of other layers. Therefore I have created a Domain Layer project with three classes e.g. Person, Order and ...
0
votes
0answers
67 views

Creating a common ancestor form in Visual Studio

I have 5 forms which in hindsight should have an ancestor descended from Form. Unfortunately, the common elements of the forms is a splitContainer and a listbox in one of the containers. Each form ...
4
votes
2answers
1k views

Where do I define WCF client endpoints in a test project?

I have a class library-- call it Services.dll-- which is a wrapper for some third party functionality. The third party gave us a bunch of DLLs and those "inner" DLLs call a WCF service. Normally, ...
4
votes
1answer
720 views

Abuse of XML comments to keep comments up-to-date (in C#)

Problem: Comments deteriorate when renaming a variable/class/method/etc in Visual Studio. Occurrences of said symbol in comments do not get updated by refactoring (no surprise, how could VS know). ...
3
votes
2answers
3k views

What is the preferred way to get data from database for data that frequently used?

Says, I have employee table, with {id, name, unit, etc..} what is the preferred ways to get this data if I frequently use this data, my first option is to query it from database when needed, something ...
1
vote
2answers
784 views

Making localization files easy to use for translators

I want to make my application available in many languages. I started using Resource Files, but there is a little problem with them. I want other people to have access to these files. Visual Studio ...
25
votes
4answers
11k views

Why would a development team insist that using a single solution for multiple projects in Visual Studio “increases interdependence complexity”?

I'm helping to manage an external team who are starting to develop new versions of some existing products. Historically, this team has always used a model of a single project in a single solution for ...
2
votes
2answers
2k views

Logging Implementation in a project using a class library or a web service

I'm currently working on a requirement to implement logging in multiple projects and require to develop a enterprise level logging application that can be using in n number of projects. Present ...
4
votes
2answers
554 views

Build and project patterns when targeting .NET Core and .NET Framework flavors?

We've got a solution with 20 .NET Framework 4.5 .DLLs (say helloworld01.dll to helloworld20.dll) where we want to add Linux support (to each) in the near future. We think this means each of those ...
-1
votes
1answer
124 views

How to quickly work on a single class of a big GUI C# project?

So here's the problem. I have a massive C# project in Visual Studio. It has a big GUI that manages a large number of classes. In one of the form windows, there is a bunch of textboxes. The user fills ...
1
vote
1answer
952 views

I have a few questions about the MVP pattern in a WinForms project

I hope someone can answer these. I have a WinForms project with +/- 8 forms. I have an SQLite database and a class that handles the queries to this database. I would like to use the passive View ...
-7
votes
1answer
241 views

Visual Studio C# Question

Say I have a program where a user is presented with a treeview of multiple directories and must check desired file/directories that they would like to later be copied. That aside once the user has ...
-7
votes
2answers
2k views

Referencing a C++ DLL from within a C# ASP.NET project using Visual Studio Community 2015 [closed]

This question might be a little odd, but is there any specific way to import a C++ reference into an ASP.NET C# project? The problem I am having is that VS is giving me the following error: Error ...
8
votes
2answers
6k views

Have the unit test “using” the project, or just have same namespace?

Background I am working on a project with C# .NET, and I've just added a new unit test project to my solution in Visual Studio. The way that I always have been doing this is: Create a new unit test ...
1
vote
1answer
703 views

Does anybody still use TODO for writing code later on? [closed]

Statement I often find myself still writing the following statement all over my code: // TODO: (the work that needs done) I do this in order to flag that I need to come back and do something later ...
3
votes
2answers
515 views

Write unit tests for the libraries, or just the application?

Background I am fairly new to unit testing, and have been recently using the Visual Studio Test Manager to create my Unit Tests. The way that I have currently been doing things is as follows: Create ...
0
votes
2answers
299 views

Trust .net compiler after Microsoft updates

Microsoft releases upgrades and changes to .net, msbuild and Visual Studio quite frequently. How can I be sure the MSIL code created by msbuild or the Roslyn compiler in VS 2015 will be the same or ...
3
votes
1answer
2k views

Project structure: Where to put object factories

I am working on a C# programming project in Visual Studio. I have created various VS library projects inside the VS solution containing the various components of the solution. Without giving it too ...
-1
votes
3answers
892 views

.Net Project architecture and DB connection

I'm looking at a new project to be developed in .Net, and I'd like to do it the right way. I'd like to create a solution with 3 parts : a front- and a backoffice, both using a the third part as ...
1
vote
0answers
72 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 ...
0
votes
1answer
2k views

Step-by-step functional testing automation

I have a basic class in C# from which I create inherited classes for databinding scenarios. You can think of it as a substitute for .NET's DataRow class. I want to automate testing of a typical row's ...
1
vote
1answer
999 views

Strategies to manage a modular C# framework

Currently I'm building a large framework whose purpose is to run several algorithms in sequence. Many of these algorithms have interdependencies in data structure - the output of one algo is the ...
9
votes
3answers
14k views

Abstract Property In Base Class To Force Programmer To Define It

I'm coding with a state pattern for an embedded device. I have a base/abstract class called State and then each discrete(concrete) state class implements the abstract State Class. In the State Class ...
1
vote
1answer
162 views

Using and referencing external executables in a solution

I have an application written in AS3 which I need to be able to start up from my C# application. I have a prototype that does this just fine but my question is in relation to how I would arrange my ...
4
votes
2answers
16k views

Best practice to include XSD in C# project

I have an XSD schema I need to include within my program, to validate some user input XML. The schema will need to be regularly updated. (By the programmer.) My current method to include this is hold ...
18
votes
2answers
2k views

Is there some sort of systematic strategy for designing and implementing GUIs?

I am using Visual Studio to create a GUI application in C#. The Toolbox serves as a nifty component palette that allows me to easily drag and drop buttons and other elements (for clarity I'll say ...
3
votes
2answers
5k views

Is there a way to sort code properly into regions dividing methods and events? [closed]

I'm using ReSharper and CodeMaid, both have their own "organize" code option but the problem is that i have no idea how to tell them what is an event and what is a method/function that i coded. If i ...
1
vote
2answers
1k views

How can I set a time limit for a game?

I am learning the multi-threading and timer in C# now. But it seems I can't find a good solution. For example, I would like to see how many addition problems that I can solve within 1 min. I would ...
-3
votes
1answer
579 views

When using Visual Studio 2012 do you have to use the drag and drop system? [duplicate]

I am fluent in most of Java and have thought about moving on to a .Net language. Obviously C# and Java are very similar so I have chosen to learn C#. When programming in Java I would always use ...
2
votes
2answers
4k views

Organizing solution / project structure and classes for Line of Business Application (LOB)

The question how-do-you-organize-your-projects already has a few good answers. I would like to get a better understanding about this suggested structure: MyApp.Core MyApp.Model MyApp.Presenter MyApp....
0
votes
2answers
172 views

How to deal with a new version of visual studio's directory?

When upgrading Visual Studio to a newer version, a new directory is created e.g. "Visual Studio 2013". I understand that that makes sense as we want to differentiate between code targeting different ...
1
vote
1answer
353 views

Collaboration between a Graphic Designer and Expression Blend developer? [closed]

I'm new to the programming world and also a little bit confused. My brother would like to work with me on some program. I'm a graphic designer so he asked me for UI and all it's elements. I would ...
2
votes
2answers
13k views

What is the difference between C# and Visual C#?

So let's say I want to start learning C# so I can program Unity with it. I look for a good reviewed book and it says "Learn Visual C#!". I ask myself, what is the difference between Visual C# and C#? ...
0
votes
1answer
866 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 ....
1
vote
1answer
124 views

When internationalizing texts, should underscores (for keyboard shortcuts) be part of the texts to be translated?

I have a project where I need to translate a lot of words and text fragments in different languages. In these texts, underscores are currently added in these text (fragment(s)) to be used as keyboard ...
-1
votes
2answers
609 views

How should I structure my namespace tree so that I have a Math class and Math namespace?

I don't know if this is a good or bad idea, or if it's technically even possible... but I'd like to have something of the following sort: public class Math { public int gcd(a,b) // Method for ...
1
vote
1answer
207 views

C# basic window content convention

I'm learning C# using visual studio express 2012, and I cannot find a source online that explains window content convention. What I mean by this is, what's the appropriate way to change the context / ...
1
vote
6answers
2k views

Wise way to implement a website login and database tables for a small shop

Im building this website for a small store and I was told that its better not to keep the login and the rest of the users information on the same table. Now im wondering, what is the best way to ...
7
votes
4answers
14k views

How to organize MVVM files in solution

I'm fairly new to the MVVM concept but like a lot of the flexibility it gives me so far. However, I'm struggling to find a good way to manage my code. I have several classes that are just sitting in ...