Questions tagged [c#]

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

Filter by
Sorted by
Tagged with
18
votes
5answers
14k views

What's a good naming convention for generic types in C#? [closed]

I decided to ask this question here instead of on stack overflow because it is rather subjective. In C#, typically I see generic types with very poor names. Specifically, "T" is commonly used but is ...
7
votes
4answers
3k views

Best algorithm/practice when creating a search mechanism for your database? [closed]

I have been designing a database where it is very important to provide users with a good search mechanism. So I was wondering what some of the best practices are for using keywords to search over ...
0
votes
1answer
195 views

Proxying the multitons

I have an app which acts like a TCP server and accepts multiple connections. Each connection is made by a distinct device, with a unique ID (the ID is reported by the device in two different messages ...
3
votes
2answers
642 views

Application design question regarding saving files

I am working on an application in C# and I am having some extreme difficulty solving this design issue. Basically the application allows users to create cook books. A user can click "new book" and ...
21
votes
2answers
99k views

Generating a class dynamically from types that are fetched at runtime

Is it possible to do the following in C# (or in any other language)? I am fetching data from a database. At run time I can compute the number of columns and data types of the columns fetched. Next I ...
9
votes
3answers
1k views

Is there a quasi-standard set of attributes to annotate thread safety, immutability etc.?

Except for a blog post here and there, describing the custom attributes someone created, but that do not seem to get any traction - like one describing how to enforce immutability, another one on ...
2
votes
5answers
255 views

getting back to c# programming after dabbling in non tech world

Whats the best way to get back and stay abreast to latest stuff going on with C#3/4? I do have Jon Skeet's book
180
votes
5answers
163k views

When do you use a struct instead of a class? [closed]

What are your rules of thumb for when to use structs vs. classes? I'm thinking of the C# definition of those terms but if your language has similar concepts I'd like to hear your opinion as well. I ...
4
votes
2answers
2k views

Do .NET 4.0 Code Contracts have a role to play in solo-programmer projects?

I often find myself wondering what programming best practices apply to solo programming, since most of the time, I'm the only programmer on a project. I just started experimenting with C# 4.0 Code ...
9
votes
4answers
13k views

Patterns and practices for Web Scraping in .Net (C#) [closed]

I will be putting together an application to automate an external web site/application. In some instances I will need to navigate the site as a user would (some links I need to follow cannot be ...
1
vote
3answers
551 views

What do I need to know to develop a paperless application using .NET?

I want to develop a paperless application in .NET to reduce paper usage at my university. It will contain Exchange data and reporting. What do I need to study before I start?
18
votes
1answer
8k views

c# class naming standards/guidelines

Over the years I've used various naming conventions for services in my applications for example: [ClassName]Service [ClassName]Manager [ClassName]Factory [ClassName]Provider [ClassName]...
5
votes
8answers
2k views

Learning Haskell and C# Simultaneously [duplicate]

I'm a programmer who's still in his teens. I've been doing some programming for a couple of years now, I started on Ruby, and later switched to Python due to the massive amount of learning resources ...
1
vote
6answers
822 views

i am “scared” to learn a new language

I have be developing in c# for the last about the last 8 years. I feel that i am quite experienced and knowledgeable in the whole .net platform. I have got to the point where i want to start learning ...
1
vote
1answer
735 views

Pattern for SQL data mining app

We have an app that is used for data mining on our client database. Typical uses include getting a list of clients and their email addresses, running reports about user transactions between certain ...
1
vote
3answers
464 views

Is EF4 mature enough with MySQL or Oracle? [closed]

Is Entity Framework 4 with MySQL or Oracle mature enough to be used on production level web application? Can it provide high level of performance, or should we stick with just plain data access with ...
4
votes
2answers
832 views

Improving the speed of writing code in C#

Laugh if you want, but I used to develop substantial line-of-business applications in VB6, long before the .NET framework came along. Why, when I was your age, we used to walk two miles in the snow, ...
14
votes
3answers
6k views

Abstract Base Class with Interfaces as Behaviors?

I need to design a class hierarchy for my C# project. Basically, class' functionalities are similar to WinForms classes so let's take WinForms toolkit as an example. (However, I can't use WinForms or ...
16
votes
6answers
6k views

Why is closure important for JavaScript?

C#'s lambda expression also has closures but is rarely discussed by the C# communities or books. I see far more JavaScript people and books talk about its closures than they do in the C# world. Why is ...
0
votes
3answers
743 views

Are there any good resources for refactoring existing C# code to use LINQ while keeping your tests passing?

I've been teaching myself a little LINQ and an exercise I thought would be useful was to take my existing Project Euler C# code, which I built using Test Driven Development and gradually convert it to ...
15
votes
1answer
653 views

Are there any examples of implementing and effectively responding to a “Chaos Monkey”?

Jeff Atwood recently wrote a blog post about Netflix's implementation of a "Chaos Monkey". It is a very high level article. I am curious if anyone has actually implemented this technique for testing a ...
1
vote
1answer
929 views

difference between Visual Studio and RADs?

What is the main difference between a Rapid Application Development tool like MonoDev and Visual Studio, is an RAD more focused on one thing? I'm looking to make a web application, are there ...
8
votes
4answers
559 views

Training a 'replacement', how to enforce standards?

Not sure that this is the right stack exchange site to ask this of, but here goes... Scope I work for a small company that employs a few hundred people. The development team for the company is ...
7
votes
1answer
6k views

Learning C# quickly

I just got a position at a big, well-known C#/.NET company. The thing is that I don't know any C# or .NET at all (they know that) and I want to learn as much as I can before I start, to not waste time ...
1
vote
5answers
319 views

Case convention- Why the variation between languages?

Coming from a Java background, I'm very used to camelCase. When writing C, using the underscore wasn't a big adjustment, since it was only used sparingly when writing simple Unix apps. In the ...
27
votes
9answers
4k views

Why should one want to disable compiler warnings?

This answer and the comments added to it show a way to disable several compiler warnings using #pragma directives. Why would one want to do that? Usually the warnings are there for a reason, and I've ...
13
votes
4answers
3k views

Is it a “pattern smell” to put getters like “FullName” or “FormattedPhoneNumber” in your model?

I'm working on an ASP.NET MVC app, and I've been getting into the habit of putting what seem like helpful and convenient getters into my model/entity classes. For example: public class Member { ...
7
votes
3answers
593 views

Is creating a full application in Silverlight advisable?

Is creating a huge public site fully in Silverlight really advisable? for eg. an ecommerce site. I don't want to start any debate but actually I feel Silverlight shouldn't be used for full website ...
6
votes
4answers
5k views

C# String.format extension method

With the addtion of Extension methods to C# we've seen a lot of them crop up in our group. One debate revolves around extension methods like this one: public static class StringExt { /// <...
4
votes
2answers
3k views

Low latency technologies for c++, c# and java?

I've been reading job descriptions and many mention 'low latency'. However, I wondered if someone could clarify what type of technologies this would refer to? One of the adverts mentioned 'ACE' which ...
6
votes
10answers
601 views

What is the best way to discuss/plan/negotiate about code architecture remotely?

Our team is distributed in space and time, so we have no ability to discuss the architecture of the code in real time. How can we discuss it via documentation: write code interfaces/ comment/ modify, ...
23
votes
6answers
12k views

Aspect Oriented Programming: When to start using a framework?

I just watched this talk by Greg Young warning people to KISS: Keep It Simple Stupid. One of the things he suggested is that to do aspect-oriented programming, one does not need a framework. He ...
6
votes
3answers
7k views

Can I say that ASP.NET is compiled?

You know that C# is a compiled language. But when we develop web applications we use ASP.NET + C#, in this case can we say that ASP.NET is compiled? If ASP.NET is not compiled does it affect the ...
12
votes
3answers
2k views

Question on design of current pagination implementations

I have checked pagination implementations on asp.net mvc specifically and i really feel that there is something less efficient in implementations. First of all all implementations use pagination ...
4
votes
10answers
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 ...
3
votes
4answers
230 views

Creating a library in two languages simultaneously

I'm planning on writing an open source HTML parsing library in .Net so that I have a project out in the wild when I start looking for developer jobs. Now, in my Masters program I started learning Java ...
11
votes
4answers
15k views

Use Dependency Injection For Data Objects?

I'm just learning about dependency injection, and am stuck on something. Dependency Injection recommends sending dependent classes through the constructor, but I'm wondering if this is necessary for ...
9
votes
2answers
4k views

GUI, BLL, DAL Organization In A Project

I'm reading about application layers, and want to use this design in my next project (c#, .Net). Some questions: Is the separation of layers done through namespaces? Project.BLL.Whatever, Project....
23
votes
9answers
11k views

LINQ Style preference [closed]

I have come to use LINQ in my every day programming a lot. In fact, I rarely, if ever, use an explicit loop. I have, however, found that I don't use the SQL like syntax anymore. I just use the ...
3
votes
3answers
774 views

How To Choose Between Different Methods of Handling/Raising Events?

In situations where I need to write observer/subscriber code, how would I choose between the following approaches? A) Declaring an event that simply notifies a client something happens but requires ...
3
votes
1answer
637 views

C# type system and dynamic type

I'm writing a paper about the C# (and Go) type system with focus on the dynamic aspect. Does anybody have suggestions for papers/literature? The things I found don't go much into detail. I would ...
21
votes
6answers
5k views

Should Properties have side effects

Should properties in C# have side effects beside notifying of a change in it's states? I have seen properties used in several different ways. From properties that will load the value the first time ...
12
votes
5answers
13k views

Programming practice - Is there a site that has a daily “write a method to do X” type challange? [duplicate]

Possible Duplicate: Programming Puzzles Looking for ways to help me improve my C# coding skills. I thought it would be handy if there was a site that asked you to write a new method every day to ...
1
vote
3answers
139 views

Schema/Code for respecting different schedules

We accept leads from lead providers. We only allow certain providers to post leads to us during certain days/times. Currently, we have 3 schedules, but we might add 1 or n more in the future: Sunday @...
1
vote
1answer
180 views

Interested in Feedback on QA System Design

I'm in the beginning phases of creating a QA system and I want to make sure that the design decisions that I'm making now make sense and won't bite me in the butt later on. If you have even the ...
6
votes
2answers
4k views

Why we should build with the highest warning level in .NET?

I heard that we have to build with the highhest warning level. Is it true? why? And how to change default .NET warning level?
6
votes
2answers
2k views

Using an actor model versus a producer-consumer model?

I'm doing some early-stage research towards architecting a new software application. Concurrency and multithreading will likely play a significant part, so I've been reading up on the various topics. ...
7
votes
3answers
31k views

Multi-threading in C# .NET Windows Service

I am writing a Windows Service (using C# .NET 3.5 VS2008) and my requirement is: When the Windows Service start - it performs record check operation (in Database) @ every 30 second interval (I have ...
2
votes
1answer
1k views

What is the benefit of using sharp architecture?

I'm working in a project that use nhibernate as orm. Is there any benefit for me to use sharp architecture? what is these benefits?
3
votes
3answers
1k views

Making Separate Assemblies For Different Types Of Tests For The Same Component?

I was told by a few members here that splitting up my unit tests into different assemblies for different components is the best way to structure unit tests. Now, I have a few questions about that ...

1
85 86
87
88 89
92