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
9
votes
5answers
2k views

What is the standard for modeling modern applications prior to development?

I'm taking on my first enterprise-level application and I want my team to model the entire ASP.NET MVC C# application before we even tap out one line of code. UPDATE: This was not intended to be a ...
2
votes
2answers
3k views

Best practice to save data in different databases using C# ADO.NET

I would like to know if you guys have any best practice when dealing with transaction between different databases vendors. For example, if you have a C# application that save customer data in two ...
7
votes
3answers
385 views

Long-Term Strategy For Implementing a QA System?

I have been given the task of implementing some QA testing into a massive existing system. We're going to start out with system-level tests and might add unit tests if it is deemed necessary. I ...
7
votes
1answer
2k views

Enforcement of returning non-null

We are implementing some web services, and need to ensure that some of our methods always return non-null values. We've investigated two ways of doing this: Using code contracts, and returning the ...
4
votes
3answers
5k views

Visual Studio 2010 - Local File History

I have been using netbeans for many years now and recently I have moved from PHP/Git/Netbeans to C#/TFS/VS10. It has been very good so far, yet I miss this one little feature I enjoyed so much in ...
13
votes
3answers
10k views

Microsoft's current best practices for building a .NET data tier? And reality?

The development team I'm working with will be moving to .NET 4.0 soon, however, the data access class library we use still uses ADO.NET "classic", meaning SqlDataReader, DataTable, and the like. ...
12
votes
5answers
2k views

Why do Windows Forms / Swing frameworks favour inheritance instead of Composition?

Today a professor of mine commented that he found it odd that while SWT's philosophy is one of making your own controls by composition, Swing seems to favour inheritance. I have almost no contact ...
61
votes
17answers
32k views

Why use an OO approach instead of a giant “switch” statement?

I am working in a .Net, C# shop and I have a coworker that keeps insisting that we should use giant Switch statements in our code with lots of "Cases" rather than more object oriented approaches. His ...
4
votes
9answers
2k views

The definition of C-based language

What is the definition of C-based language? Is C# considered to be C-based? Is Java considered to be C-based? Furthermore, what does it mean for a language to be based on another language anyway?
5
votes
4answers
395 views

What's the correct approach for passing data from several models into a service?

I have an AccountModel and a page where the user can upload a file. What I would like to have happen is when the user uploads the file. The PageController does something like the following. this is ...
11
votes
8answers
9k views

Variable naming conventions? [closed]

I've just started using ReSharper (for C#) and I kind of like its code smells finder, it shows me some things about my writing that I meant to fix a long time ago (mainly variable naming conventions). ...
5
votes
4answers
1k views

Fast cold start text editor [closed]

Is there text editor with c# syntax highlight which starts VERY FAST? I just want look source code some files in project and i donnt want wait 30 seconds while VS starts.
2
votes
3answers
2k views

Writing a CSS parser in C#. What do you think is the best strategy?

I'm in the middle of writing a CSS parser in C#. I'm well under way, but I also have those times where I wonder if I'm taking the best approach. The things I've considered are: Feed the CSS grammar ...
1
vote
2answers
296 views

C# Linq to <blank> which type is most used and which are most hated/unneeded [closed]

I have read and used many good Linq to . I have also read that some of the Linq to __ are not worth learning as there are better techniques. I was just wondering which of the bunch should I ...
5
votes
3answers
2k 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 ...
13
votes
7answers
1k views

Are naming convention guidelines worth caring about?

I name my variables using the .Net conventions: camelCase for variables and fields (I tend to use _camelCase for private fields in a class) PascalCase for methods, properties and classes The only ...
4
votes
4answers
2k 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)(...
5
votes
3answers
665 views

Data Persistency, patterns and approaches

Data persistency has recently become a really grip for me, especially how long to maintain database connectivity and how many connections are feasible for a given request. I've been using .NET; ...
0
votes
1answer
837 views

Adaptative interface with Open GL and machine learning in C#

For my Semester project I have to go for any Adaptative Interface Design. My language is C# and I have to Use OpenTK (wrapper for OpenGL). I have an idea that I should show two points and some ...
5
votes
4answers
22k views

Naming Convention for Private / Public Fields [duplicate]

I read the following on the MSDN: Use Pascal casing for all public member, type, and namespace names consisting of multiple words. Note that this rule does not apply to instance fields. For reasons ...
12
votes
5answers
18k views

Why have a method that returns a bool/int and has the actual object as an output parameter?

I see the following code pattern all over the place in my company's codebase (.NET 3.5 application): bool Foo(int barID, out Baz bazObject) { try { // do stuff bazObject ...
-1
votes
3answers
277 views

Architecture suggestions [closed]

I'm writing a small application that will reset the entire “environment” consisting of various machines and applications. Machine names are added via config file - this is read, the appropriate ...
16
votes
2answers
6k views

What are the main practices and design patterns every .NET guy should know? [closed]

In my brief time as a professional programmer I've seen lots of applications written by programmers who's entire education appears to have been reading the first couple of chapters in a .NET 2.0 book. ...
13
votes
7answers
3k views

Can anyone suggest a project for me write to help me understand threading

I am currently a C# developer with a pretty shaky understanding of threading. Both of these links have been suggested in other posts: http://www.yoda.arachsys.com/csharp/threads/ http://www....
31
votes
7answers
13k views

How to suggest using an ORM instead of stored procedures?

I work at a company that only uses stored procedures for all data access, which makes it very annoying to keep our local databases in sync as every commit we have to run new procs. I have used some ...
1
vote
3answers
462 views

Is iron ruby on Silverlight a viable alternative to C#?

I've heard a lot of buzz about the Iron languages.. I mostly write line of business applications in c# and I'm not really enjoying c# these days. Is IronRuby mature and fast enough to be used in ...
6
votes
3answers
334 views

What is the best way to lead a team of 4-5 students for a summer project?

We're a bunch(4-5) of 3nd year college students about to begin our 3 months summer vacation and we would like to get going on a project. We want to make a game with XNA, it doesn't have to be big or ...
20
votes
2answers
7k views

Is C# actually a multiplatform language?

C# (and the .NET platform in general) is looking like it's becoming a good option form multi-targeting applications: official Microsoft .NET framework: full-blow Windows development, ASP.NET ...
2
votes
4answers
26k views

c# interview with a programming task [duplicate]

Possible Duplicate: How to prepare yourself for programming interview questions? I am going for c#-sql server job and I was looking for some link where I could download some questions and answers ...
5
votes
4answers
1k views

Shouldn't the lazy evaluation/execution be syntactically differentiated from eager evaluation/execution in C#?

We know about the deferred execution or lazy evaluation features introduced in C#. But at times, people become confused with them. Because there is no significant difference. You can only know if you ...
10
votes
2answers
5k views

How Do You Organize Your ASP.NET MVC 3 Applications? [duplicate]

The one thing that I am having a hard time figuring out with developing an extensible application platform in ASP.NET MVC 3 is how to modularize everything into an easy to update and distributable ...
11
votes
1answer
1k views

Does anyone have insight into whether MonoDroid is really dead?

My company just recently invested in the Mono for Android tools for Visual Studio as we have a lot of .NET developers and were impressed with how powerful the monodroid tools seemed. After reading the ...
5
votes
4answers
1k views

Best approach for bidding a project

We basicly have project that always turn around the same pattern. But, it sometime happens that we have project that go absolutly at the opposite of what we usualy do. It become now more difficult to ...
9
votes
8answers
18k views

How to abbreviate variable names [closed]

I always struggle in abbreviating variable names. Is there any standard for abbreviating variable names?
52
votes
7answers
169k 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 ...
4
votes
6answers
2k views

3-Tier Object-Oriented Design Flaw?

I am going through training at my new job to use good object-oriented design with a 3-tier programming style. My supervisor says I have a design problem with my code: class Program { public ...
2
votes
4answers
442 views

Standardised Programming Techniques / Procedures

I don't know if this is a question, or a start of a conversation or even a completely irrelevant topic. Why isn't programming more standardised? Im really new to this and I find it hellish ...
1
vote
4answers
539 views

Is the link between C# programming language and music obvious for English native speaker?

French is my native language and I just realized that the # in C# is the same character as for the diese music character that raises a note by a half tone. Also, As I made my music elementary class ...
8
votes
1answer
414 views

Are there tasks which require significantly less work with Ruby than C# 4.0?

I just finished reading the Ruby chapter of the book 7 Languages in 7 Weeks. Aside from some syntactic sugar here and there I can't really see anything which can't be done with C# with a similar ...
1
vote
7answers
793 views

Quick OOAD Question

Given the following set of classes: Camera, Photo, Photoshoot, Subject. How would they interact to model the following sentence? The next subject is called and has their photo taken. I want to see ...
75
votes
9answers
66k views

Why use partial classes?

In my understanding, the partial keyword does nothing but allow a class to be split between several source files. Is there any reason to do this other than for code organization? I've seen it used for ...
21
votes
7answers
10k views

How do programmers deal with low level software development in high level languages?

I am somewhat new to programming and the best way I can ask this question is with an example. I know how to do basic things in Java and C#. Things like a small windows forms application or make a ...
2
votes
2answers
173 views

Code reviewing in the presence of strong type inference and basic editors

I’m curious to know how folks deal with comparative code reviews (version x against y of a file) in the presence of strong type inference, that is when ‘var’ (in C#) or ‘auto’ (in C++ 0x) is used in ...
4
votes
2answers
9k views

In MVC where do you put action methods for views in the shared directory?

I have a website built using a MVC.NET framework with C# that uses some shared views and partial views. In order to display the views properly there is a bit of code that must reside in the ...
1
vote
5answers
998 views

How do I get my open-source idea started? [closed]

I have an idea for an open source project. It's about building developing tools for software developers. Yet I have never joined a development team and now I don't know much about these teams except ...
14
votes
6answers
21k views

What naming Convention to Use for C# Function Parameters

There are situations when a name passed in Parameter will be Cast into a new type, but the name of the Passed object should remain similar. For the case of Class Attributes, we can use this operator, ...
7
votes
1answer
312 views

Should I let my users write BnfExpressions to extend my grammar?

Preface I'm designing a templating language (please skip the don't/why?? speech). One of the major goals of this language is to be extensible. There are 2 main elements in my language. "Tags" and "...
2
votes
3answers
922 views

What should I name these methods? [closed]

I have two interfaces, one with and one without generic type parameters. The non-generic interface is used internally so that I can store instances of the generic interface in a collection. All would ...
5
votes
7answers
3k views

Costs of Switching to Java [closed]

I'm a C# dev and I have plans of starting to develop apps targeting Android, which of course means Java. I have heard good things about Mono for Android and the idea of reusing my skill set is ...
14
votes
12answers
4k views

What is the regarded current best practises regarding the “this” keyword in front of field and methods in c#?

Unless it is needed to differentiate between a variable and field with the same name, I never put this. in front of a field or any member access in C#. I see this as no different to m_ prefix that ...

1
86 87
88
89 90
92