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

1
vote
1answer
64 views

Best way to process a queue in C# (PDF treatment)

First of all let me expose what I would like to do : I already dispose of a long-time running webapp developed in ASP.NET (C#) 2.0. In this app, users can upload standard PDF files (text+pics). The ...
0
votes
3answers
93 views

What are the alternatives to resx file

I am developing a Windows application and I want to store all the text for labels, radio buttons, buttons, check boxes and column headers of grids at one place. I have tried using a class file, an xml ...
3
votes
1answer
188 views

call a function and never wait for it in C#

I have a controller in my mvc4 web application in which there is an action that needs to call another function. What happens in that function i.e. the return value is not important for my action. How ...
-2
votes
1answer
102 views

Do we need even more web frameworks in C# now that async await is here [on hold]

Developing endless frameworks for web application, websites and web services is always great fun. It's one of the richest areas where you have 100 different ways of achieving pretty much the same ...
-1
votes
1answer
158 views

Is there a tool that visually represents all the potential paths to a particular piece of code?

As an example of what I need and why I want it, I am trying to determine how a certain value (CurTotal) is getting set (wrongly). I've come up with these notes to myself to try to understand just what ...
2
votes
1answer
140 views

Blurring the lines between async and regular functions in C# 5.0

Lately I can't seem to get enough of the amazing async-await pattern of C# 5.0. Where have you been all my life? I'm absolutely thrilled with the simple syntax, but I'm having one small difficulty. ...
-2
votes
0answers
37 views

Still working or do Microsoft MCSD Windows Store Apps + Web Applications [on hold]

I work as a developer in a company and I feel happy: the job is good and i feel fine with my company, they respect my work time and pay my salary on time. My employment contract has a duration of 10 ...
13
votes
9answers
1k views

Are too many if-else statements for validation bad? [duplicate]

From the book Professional Enterprise .Net, which has 5 star rating on Amazon that I am doubting after having a read through. Here is a Borrower class (In C# but it's pretty basic; anyone can ...
1
vote
1answer
126 views

catch(Exception ex) would this example be a code smell? [duplicate]

We have production code that is not easily deployed in a test area. We also have a new library of code that we would like to "plug in" to the production code. The production code would be making a ...
0
votes
0answers
40 views

Strong Name signing order for dependant projects

I have two project A(.EXE) and B(.DLL) in the solution. A references B. If I delay sign both and send them for full signing. Will A be able to load B after ? Or do I have to get B fully signed first, ...
-1
votes
0answers
54 views

New application [on hold]

I am new to programming. I would like to say i have the basic of programming in c# under my belt. I just finished making a clone of a text editor application like notepad and i was wondering if anyone ...
1
vote
1answer
93 views

Working with Multiple XML Schema Classes in C#

I'm working with a data import process in C#, which takes a zip file filled with XML files and saves specific data points into a database. This is accomplished by loading the XML data into classes ...
-4
votes
0answers
67 views

For a major in Computer Information Systems, what language should I choose.. C++, C#, or Visual Basic [on hold]

I have to choose a language to learn programming with, and I have to choose one of these three. C++, C#, or visual basic. I have been told by a programmer C# is the latest and greatest so to learn ...
0
votes
3answers
188 views

Best Practices To Create Error Codes Pattern For an Enterprise Project in C# [on hold]

I'm working on an enterprise project which will be deployed in many SMBs and Enterprises. The support for this project would be struggling and so I want to create a coding pattern for errors (Like ...
2
votes
4answers
273 views

Get rid of long/Complex if..else statements using Chain of Responsibility?

I've an HttpHandler, which allows users to login to a system by passing in an encrypted code. Inside the ProcessRequest it performs quite a few steps. Retrieve the encrypted code from request ...
3
votes
3answers
150 views

Confusion with Factory pattern regarding Liskov's Substitution Principle, code maintainability and Unit Testing?

I have a confusion regarding Factory Pattern there are basically two ways You can implement that. Approach 1: public interface IProductFactory { IProduct GetProductA(); IProduct ...
2
votes
4answers
95 views

Why should IQueryProvider implementations throw NotSupportedExceptions?

Searching the web, we can find plentiful examples of various ORMs (nHibernate, EF, LinqToSql, etc.) that implement but don't actually support the full IQueryable<T> interface, throwing ...
0
votes
2answers
269 views

name convention for variables in C# [on hold]

I'm watching a video on C# about Variables. The author declares a variable inside a method and he named it like this: string MyName ="James"; my question is: which convention is recommended by .Net ...
0
votes
3answers
250 views

Best practice to store DateTime based on TimeZone

Developing a web application which should allow User to schedule appointment based on their TimeZone. And I am storing the User scheduled datetime as server datetime into database field. While ...
4
votes
4answers
378 views

From a high level programming perspective, where does the 'different-paradigm' barrier between C# and F# really kick in?

I'm aware that they both use different programming paradigms, but from a high level perspective apart from differing syntax it seems most basic tasks can be achieved in similar fashion. I only say ...
8
votes
4answers
283 views

How would I design an interface such that it's clear which properties may change their value, and which will remain constant?

I am having a design issue regarding .NET properties. interface IX { Guid Id { get; } bool IsInvalidated { get; } void Invalidate(); } Problem: This interface has two read-only ...
2
votes
1answer
110 views

Building a strong robust client-server system

I need some help with regards to implement a pre-designed system that has 4 components and several constraints. I've spent approximately 50 hours trying to determine the best way to build this system; ...
7
votes
4answers
346 views

Instantiating Null Objects with Null-Coalescing Operator

Consider the following typical scenario: if(myObject == null) { myObject = new myClass(); } I'm wondering what is thought of the following replacement using the null-coalescing operator: ...
1
vote
4answers
145 views

Design Pattern for data import of various source types and to various destination types

I have to design and build an import script (in C#) that can handle the following: read data from various sources (XML, XSLX, CSV) verify data write the data to various object types (customer, ...
1
vote
2answers
128 views

We need a custom strategy for collecting unhandled application exceptions. What are our options?

"Unhandled exception" term In .NET Framework, unhandled exceptions are the exceptions which were not handled by the application itself, and result in a crash. In a case of a desktop application, it ...
0
votes
0answers
59 views

WPF permission-based authorization [migrated]

I've been doing C# for a month now so please forgive the 'localness' to this question but I have researched for a couple hours and I have hit a brick wall. I've seen examples left and right for ...
2
votes
2answers
232 views

How to improve in code after you know many languages? [closed]

Over the past years I learned about 14 programming languages (assembler phyton delphi qbasic c++ c# ruby perl - etc etc etc). However this was all out of my own interest, I didn't went to school ...
0
votes
1answer
159 views

Client Server System in .Net

I am not asking for code but rather design ideas. I am trying to develop a new system to learn more about client/server development. I would have 3 systems: Client 1 : Client Server 1 : Server DB ...
-1
votes
0answers
58 views

Learning ASP.NET (C#) from a book [closed]

I want to learn ASP.NET but I don't know much about C# and the book that I have is called 'Beginning ASP.NET in C# and VB.NET' so the book will not teach me that much about programming just a little ...
1
vote
2answers
60 views

MVP Implementation at the UserControl Level

I'm trying to figure out how MVP should be implemented at the UserControl level. I thought I had it, but I ended up reading a blog post that pretty much shut me down. Now I'm back at the start and ...
3
votes
1answer
119 views

Selecting an appropriate design for Month/Date Selection

I have a requirement what seemingly looks very simple (and perhaps strange) but some minor details are giving me troubles. Perhaps I'm overthinking this. I'm building a scheduler application (on WPF) ...
1
vote
0answers
80 views

How I could update a DB table using a POCO class bound in a DataGridView

I try to explain better using an example: I create the class Product with attibutes like that: private string _ProductCode = ""; [DisplayName("ProductCode")] public String ProductCode { get { ...
1
vote
4answers
282 views

How do you evaluate learning C# from videos for a beginner? [closed]

I have an idea about programming in general so I know what a variable and a method is but I didn't program before. I liked C# because of Visual Studio and I only tried Hello word program in it. I ...
0
votes
0answers
52 views

Seeking solution for printing-reporting .NET

I am developing an application that prints in separate threads in extreme cases about 20-25 pages per minute to various thermal printers. Currently templates for these are XAML xps documents. All ...
0
votes
2answers
123 views

Queues and threading

I am developing a new project where I will be constantly checking a webpage for data and adding this data to a queue for processing. This data will then be removed from the queue and added to a list ...
1
vote
0answers
15 views

Hide Taskbar in Windows 8 (C#) [migrated]

Up to now, I was able to use the following C# code to hide the Windows taskbar: [DllImport("user32.dll")] private static extern int FindWindow(string className, string windowText); ...
0
votes
1answer
83 views

Techniques to Enable Dynamic Query / Calculation at Runtime

I'm working on a C# project which provides users an on-demand method of importing data from various formats and then performs mail-merge-like actions to complete a template. The process works for ...
4
votes
4answers
343 views

Big switching from one platform to another [closed]

As an example I want to switch from C#/.NET to Scala/Jvm. I'm working as a self-employed and I'm free to choose my favorite language/platform. Having more than 8 years of experience in C#/.NET leads ...
1
vote
4answers
356 views

How to figure out design pattern for this particular solution?

While working on a project I've come up with some design solution. I am having a hard time relating it to any general design pattern or analyzing this situation in details. This is also prohibiting me ...
7
votes
3answers
453 views

How to migrate my thinking from C++ to C#

I am an experienced C++ developer, I know the language in great details and have used some of its specific features intensively. Also, I know principles of OOD and design patterns. I am now learning ...
0
votes
3answers
154 views

How does a program process concurrent executions

I have a console application that is run by taking the input parameters. It can be configured by passing report name parameter, for e.g. reportgen.exe sales.xml. It hits the database and retrieves the ...
0
votes
3answers
212 views

Navigating Code in Visual Studio [closed]

OK, so my class file is getting rather large, and that's a code smell. But until I can refactor it out, I need to get a handle on it. Primary options: Code Regions. Splitting into partial classes. ...
1
vote
3answers
164 views

Is it good idea to change complete enterprise level application into ajax web app [closed]

I am working on an application which is completely written using server side method in asp.net web forms with c# . Now my team lead wants to convert whole application to ajax , in that approach we ...
-2
votes
3answers
275 views

How to do logging in console application [closed]

I have a simple console application that will be deployed as a scheduled job. Below is its pseudo code Main(string[] args) { //get xml string from database Reports reports = ...
0
votes
0answers
16 views

selenium to read text contained in tile image and click on a button [migrated]

I have a web page with contents like tile images which includes some text content and an image in it. In my application user will enter a text in a text box. What I want to do using selenium is that I ...
1
vote
1answer
87 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:       - ...
0
votes
1answer
110 views

bad practice to have actions in web api controllers

I was creating a new action for a WebApi controller and tried to create a url using the following: @Url.RouteUrl("DefaultApi", new { httproute = "", controller = "ClientApi"}) and noticed that the ...
3
votes
3answers
943 views

SOLID Application Structure and Design

A one possible structure for an application is to have it broken down into modules such as Data Access, Core, Services, UI. Now depending on what type of ORM you are using Data Access layer will have ...
0
votes
1answer
55 views

Different ways to generate the latest int type primary foreign key in code

I am new to sql. I have added 2 new tables in database. The primary key of first is a foreign key in the other. The type of the keys is integer. Now I want to generate the keys in the code and assign ...
-6
votes
1answer
123 views

What to learn C# programming [duplicate]

I'm a little tired of the tutorials that tell us how to write code but do not breakdown into semi-retard language for us newbies. Example: Console.WriteLine( @"Please explain to me why I would ...