C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform

learn more… | top users | synonyms

2
votes
2answers
398 views

Is there a name to this coding practice shown in the example? [on hold]

Take a timer in your hands, then have a look to the following code. What is it doing? foreach (var summaryOdd in odds) { var category = new PlacedCategory(); var eventId = ...
-4
votes
0answers
22 views

How to design a self-host VS Extension system, like MS Test Framework/NUnit? [on hold]

I want to write a VS Extension acting just like the built-in unit test platform, but very simple one. So that you have a custom window in which you choose an item (like a method) to run and debug. I'm ...
1
vote
1answer
38 views

Converting from AppHarbor to Azure

I'm thinking of switching my cloud provider from AppHarbor to Azure. Main reason, I love the ability of being able to scale up the number of workers as traffic/cpu usage gets really high. My question ...
-6
votes
0answers
35 views

how to prompt a user to calculate numbers using different operators on one line, on console application [on hold]

i am creating a calculator but now i am struggling on to write a code that will calculate number like: 1+3*4/6-1 = ....., please help or just give me a hint i have tried this: private static void ...
-3
votes
0answers
30 views

What realtime messaging library should I use for .NET-only clients and server? [on hold]

Currently I am in process of designing client-server application, where "server" will be hosted in our environment (Windows Server 2012), but clients are hosted as .Net 4.0 "plugins" on Windows XP SP3 ...
1
vote
1answer
216 views

Should an ASP.NET MVC application directly use Entity Framework as the model?

I'm building my first MVC application in Visual Studio 2013 (MVC 5) and I'm a bit unclear on the best way to setup my model. I've generated an entity framework model using code-first from an existing ...
3
votes
3answers
159 views

Method waits for user action

I have a structural problem for an application I'm working on. In the interest of full disclosure, it is for a university assignment so I'm not looking for you to code me an answer, just help me ...
-3
votes
0answers
25 views

Screen capture technologies [on hold]

I want to write a screencasting program for the Windows platform, but am unsure of how to capture the screen. What technology to use. I gave a fair share of tries with C# and GDI+ but I can't get ...
-3
votes
0answers
23 views

How to stay updated on the latest happening in dot net platform [on hold]

I might sound like a very generalized question but i am interest in the opinion of different programmer and how they keep themselves updated by following specific stuff. I am interested in following:- ...
-2
votes
0answers
20 views

C# How to get cookie and recover it to next request? [on hold]

My question is how can I do POST request, next get cookie from that request and set it to the next request for example GET type in C#? Please for example code. I had tried a lot of times, for example ...
0
votes
2answers
40 views

Hub which executes interface methods on all registered onstances

Is it possible to have generic class (let's name it Hub), which implements interface T. And now I can use a method named Add (not a part or interface T) on this class. And Add methods allows me to add ...
-3
votes
1answer
82 views

Automating daily procedures [on hold]

Is there a way to automate running VBA in Excel to clean up the file from inside an application? Everyday my office has to confirm that 50 people have shown up for work on time. The scheduling ...
-6
votes
0answers
28 views

how to generate offers out of some available items? [on hold]

I am working on the program which is for hotel reservation. I am using so many web services in my application and i need to make some integration so the result of all the web services at the end must ...
-4
votes
0answers
32 views

inner Join Between 3 tables [on hold]

Any one can help me to make inner join between 3 table (Product , Like , Comment ) My select statement is ("SELECT Product.*, Comment.*, Like.* FROM (Comment INNER JOIN Product ON Comment.proID= ...
-2
votes
2answers
133 views

In C#, can I do “this = …” outside of a constructor? [on hold]

Basically, can I do this, and what actually happens? public class foo { public int id; public void bar() { //do stuff this = null; // ? //do stuff ...
0
votes
2answers
98 views

Unit Testing large controller actions

I've a web page that has many constituent parts. On some user action, a POST operation is made, which then returns JSON to update the page. The problem is that this JSON payload contains a lot of ...
0
votes
0answers
5 views

converting a double to a string [migrated]

Hi i am trying to change -1 to a string. because its kinda confusing using numbers while calculating numbers. i tried Num.ToString(); doesnt work private static void ShowDivideMenu() { ...
0
votes
0answers
70 views

Evaluating local storage for data persistence for small, stand-alone applications

TL;DR - I have a standalone application that will remain relatively small. I'm trying to evaluate between using XML files or a lightweight database for local storage of data that needs to be ...
0
votes
4answers
307 views

which pattern is most intuitive for a calculator app?

The title says it all. I'm trying to build a calculator application (for self-learning purposes). The application is going to have a very common UI, with plus(+), minus(-), multiply(*) and a divide(/) ...
-1
votes
0answers
25 views

In Windows form, Can we add a label inside a combobox in c#? [migrated]

I have a combobox showing the basic education details which has three categories as Bachelor,Diploma and Schooling. I need to give these three categories as headings each have different values.Is it ...
-4
votes
0answers
65 views

Expanding my knowledge of C# [closed]

I started programming roughly three months ago in c++ and have a general understanding of topics up to classes, inheritance, encapsulation and polymorphism. I switched to c# after learning that it is ...
-2
votes
1answer
67 views

How to access client application (Scanner or .exe) which are installed on client machine using Asp.net web application [closed]

How to access client application (Scanner or .exe) which are installed on client machine using Asp.net web application? I want to Access Scanner which are installed on client machine. I'm using a ...
-5
votes
0answers
47 views

WCF certification exam retirement [closed]

Good day! Recently I decided to improve my WCF skills by passing MS 70-513 examination, but founded that the exam was scheduled to retire next year summer MS exams scheduled to retire Please, ...
0
votes
2answers
147 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 ...
3
votes
1answer
326 views

MVC: Where is the right place to set error messages?

I have a ASP.NET MVC application where in all my Models have an Errors Property used to store non-validation errors which I than display in my Views. Where is the right place to populate the error ...
-3
votes
1answer
46 views

Distinct Log and Trace for each object in .NET [closed]

I am dealing with very complex objects in .NET (in my case a finite element model that can consist of thousands of other objects say a Model instance have a large list of Element instance). I would ...
0
votes
0answers
49 views

Separation of concerns between repository and service in DDD with complex entities

This probably seems as an example of opinion-based question, but I'm actually looking for rationale on how to decide correctly, I believe there is a correct solution that can be backed by solid ...
2
votes
2answers
138 views

How do I write my BLL to make it re-usable?

Most of it was written 4-5 years ago. Our teams long term objectives are to use Entity Framework. Though we aren't gonna do it right away as our deadlines aren't allowing us to do so. Now we have our ...
0
votes
2answers
147 views

Is this instance of mixing FP and OOP a good design?

I had a strange-feeling pattern come up in some code I was writing. In a project with user accounts, there was a lot of code that needed to do common things such as creating accounts, deleting them, ...
6
votes
3answers
707 views

How to unit test code that downloads a file from a github repo

This is my solution's structure: Storage.csproj > FileDownloader.cs > GitHubProvider.cs (implements IStorageProvider) > IStorageProvider.cs Storage.Test.csproj > ...
11
votes
3answers
574 views

I get dependency injection, but can someone help me understand the need for an IoC container?

I apologize if this seems like yet another repeat of the question, but every time I find an article regarding the topic, it mostly just talks about what DI is. So, I get DI, but I'm trying to ...
0
votes
1answer
61 views

LDAP users synchronization [closed]

I'm looking for a way to synchronize a users database between a piece of software and a ldap directory. Currently I'm thinking of three possibilities to keep the track of a specific user : Guid : it ...
1
vote
4answers
301 views

When to not use dynamic in C# [closed]

I'm making a class similar to the following: public class KeyValue { public readonly string key; public readonly object value; } Value could be of any object type as a result of this ...
1
vote
2answers
150 views

Where to put database table/column names?

I'm making a web app that will be querying an existing database. I'm thinking of putting the names of the tables and columns and such into a single static class, and then referencing that when ...
2
votes
1answer
167 views

What are the motivations behind making true and false overloadable operators?

I asked this question on Stack Overflow and it was met with negative reception. I figured that Stack Overflow wasn't the right place to ask this question, so I decided to post it here. Beside making ...
0
votes
0answers
122 views

how to use Sql query to search text in CSV file and avoid iteration

I have one A File and many input files ,All files have CSV format . I want to match text of one column of all input files with one of the column of A file . I have stored all column value of File A in ...
-4
votes
0answers
48 views

parameterized query… unexpected in database using C# [migrated]

Hello there I am trying to enter database records from window Form design and programmed using MS visual C# and it approved and entered database using an other Window Form and I call the child Form ...
0
votes
1answer
74 views

How are the tiles in WORDAMENT organized?

I'm trying to create a word game, just like WORDAMENT, in my spare time. In order to present a new round, I need to create a board with 16 letters organized in a 4*4 grid. Currently, I'm generating ...
0
votes
3answers
81 views

Are EventHandler<T> and IObservable<T> interchangable?

I have an object which will periodically raise an event based on an action performed in an application. This will be heard by any listener(s) and acted upon accordingly. I do not wish to use a ...
3
votes
4answers
271 views

Is a long list of parameter checks an anti-pattern?

Background: I'm working on an application that will manage backup generators. These generators need to be able to be "linked" together. For example, Generator B might serve as a backup for ...
-1
votes
0answers
70 views

How to identify hackers based on ip addresses and the pages that were accessed [migrated]

I saw some suspicious errors being generated on my site based on pages that were requested. My error is logging the path that the user is trying to access. Because of these errors (and the paths that ...
0
votes
0answers
66 views

C# Linq question [migrated]

I am desperately trying to understand linq and now I have a concrete example of what I want to do (and fail): Console.WriteLine("{0}", (from myaddresses[x].PostalNr where x => ...
-1
votes
2answers
83 views

Class hierarchy question - do you implement separate classes for the same behavior? [closed]

NOTE: The language I am using is C#. I am currently working on a 'The Quest' mingame where there is a player and some enemies. My design so far involves a base abstract class called 'Mover' and an ...
0
votes
0answers
97 views

How can I write the code to get all the properties of a class? [migrated]

I have a program, where I want to create a new instance of the object depending on a value, I take the value and then search the list and using that list I create a new instance. Well, it goes ...
0
votes
1answer
139 views

Time Management System on Local PCs [closed]

I am looking to build a time management "app" that can be downloaded and used on an individual basis throughout my company. In theory, this app would be used to track time spent on several different ...
1
vote
3answers
216 views

How do you make sure a .net client application is not being hacked to bypass authorization claims?

We wrote a simple .NET (C#) desktop application in Wpf. We also used WIF (Windows Identity Framework) to get a list of claims for the authenticated user. Some examples are: CanOverrideSalesAmount ...
1
vote
2answers
178 views

Is this a good Visual Studio solution structure for a domain driven design RESTful web service?

I am building a .NET 4.5 C# Web API RESTful solution and I would like someone to tell me if my project solution is correct and/or wise(-enough?) for a solution designed using Domain Driven Design, ...
1
vote
1answer
251 views

Understanding C# Delegates Structure

I've been trying to understand C# delegates using Pro C# 5. In short, the author describes the motivation for delegates as a structured way of dealing with function pointers and callbacks or two-way ...
2
votes
2answers
107 views

What is the benefit of passing a delegate to the constructor instead of just having the client code create and pass the ParserSettings?

When answering a question on Stack Overflow, the library appeared to have a weird way to specify configuration, through an Action passed to the constructor: public Parser(Action<ParserSettings> ...
1
vote
1answer
124 views

Should the Presenter depend on the View or the vice versa?

So far, I have used the MVP architecture pattern a few times. Every now and then, I wonder whether my Presenter should depend on my View or vice versa, that is the View depends on my Presenter. NOTE ...