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

0
votes
0answers
27 views

where i can find shipping logistics samples and documentation [on hold]

My Company Wants To build a shipping logistics and marine services software using Microsoft WPF ,So i was wondering if there's any online samples or documentation to start with and have an idea how ...
13
votes
5answers
708 views

Why can't Java/C# implement RAII?

Question: Why can't Java/C# implement RAII? Clarification: I am aware the garbage collector is not deterministic. So with the current language features it is not possible for an object's Dispose() ...
1
vote
0answers
39 views

KnownType Not sufficient for Inclusion

Why isn't the use of KnownType attribute in C# sufficient for inclusion of a DLL? Working with Visual Studio 2012 with TFS responsible for builds, I am on a project in which a service required use of ...
9
votes
4answers
712 views

Is linq more efficient than it appears on the surface?

If I write something like this: var things = mythings .Where(x => x.IsSomeValue) .Where(y => y.IsSomeOtherValue) Is this the same as: var results1 = new List<Thing>(); ...
0
votes
3answers
180 views

When should method overloads be refactored?

When should code that looks like: DoThing(string foo, string bar); DoThing(string foo, string bar, int baz, bool qux); ... DoThing(string foo, string bar, int baz, bool qux, string more, string ...
1
vote
1answer
28 views

Optimising news fetching

I have a web scraper for scraping news from different sources in wp7. My current appraoch for doing this is: load newspapers information from xml file. go to the specified sections and fetch the ...
0
votes
0answers
62 views

Elo system behaves oddly in program I've created [on hold]

Alright, so I'm looking to build a small program (C# and XAML) that, essentially, does this: Generate array of players. Each player has a current rating and a true rating. I set current rating to ...
9
votes
2answers
318 views

How are generics implemented?

This is the question from compiler internals perspective. I am interested in generics, not templates (C++), so I marked the question with C#. Not Java, because AFAIK the generics in both languages ...
0
votes
2answers
106 views

Getting the relational table data into XML recursively

I have levels of tables (Level1, Level2, Level3, ...) For simplicity, we'll say I have 3 levels. The rows in the higher level tables are parents of lower level table rows. The relationship does not ...
0
votes
0answers
22 views

How do I POST XML generated to a URL in C# [migrated]

I am trying to send XML generated to an URL, I keep getting error with HttpWebResponse: The remote server returned an error:(417) Expectation failed This is my code. //POST to URL ...
0
votes
1answer
131 views

Entity Framework 5, separating business logic from model - Repository?

I am working on my first public-facing web application and I’m using MVC 4 for the presentation layer and EF 5 for the DAL. The database structure is locked, and there are moderate differences ...
1
vote
1answer
136 views

Organization standards for large programs [on hold]

I'm the only software developer at the company where I work. I was hired straight out of college, and I've been working here for several years. When I started, eveeryone was managing their own data as ...
-3
votes
0answers
18 views

How to get MAC address from c# [migrated]

I have a C# application. In a routine I have code to get the MAC address from using SendARP. It works on Windows 7 but does not work on Windows XP. I just get a null string returned. This is my ...
-2
votes
0answers
19 views

How do I generate and post XML in c# [on hold]

I am a new to c# and faced with a similar problem. I need to generate and post XML to a URL but the parameter in the XML fields should dynamic getting inputs from a frontend app. This layout of the ...
0
votes
0answers
67 views

What approach (or library) should I use to integrate a Forth-like language into C#? [closed]

What approach or library is the most appropriate for C# programs that read a binary file and need to process it in a Forth-like language? I'm not necessarily looking for a full implementation, but a ...
0
votes
2answers
159 views

How can I correct html for missing closing tags in c# ? [closed]

I have html stored in database received from text editors and because of some mistakes in the code the html is not valid, it is missing some closing tags. and due to this I am not able to process this ...
0
votes
1answer
185 views

how to architect this to make it unit testable

I'm currently working on a project where I'm receiving an object via web service (WSDL). The overall process is the following: Receive object -> add/delete/update parts (or all) of it -> and return ...
4
votes
1answer
407 views

Understanding Visitor Pattern

I have a hierarchy of classes that represents GUI controls. Something like this: Control->ContainerControl->Form I have to implement a series of algoritms that work with objects doing various ...
2
votes
2answers
174 views

Implementing set of processes in a stored procedure or through the code?

I want to know what's the suitable method to implement the following case (best practice). If i make a set of processes like this: select data from set of DB tables. loop on the selected result. ...
2
votes
2answers
140 views

How to structure my GUI agnostic project?

I have a project which loads from database a XML file which defines a form for some user. XML is transformed into a collection of objects whose classes derive from single parent. Something like ...
-1
votes
0answers
51 views

An alternative to a video codec for storing motion changes [closed]

I have a 3 dimensional byte array. The 3-d array represents a jpeg image. Each channel/array represents part of the RGB spectrum. I am not interested in retaining black pixels. A black pixel is ...
1
vote
1answer
146 views

Should I just always Convert.ToInt32 my integers to account for potential nullable integers?

If my MSSQL database contains a data type that is NULL (i.e. null is allowed) then ORMs, such as EntityFramework in my case, create .NET objects that are nullable. This is great, and the way I use ...
-2
votes
0answers
84 views

I'm looking for websites with programming problems that I can practice [closed]

I want to become a more skilled programmer. I also want to do it through Objective-C and iOS. What websites or programs that you know of have problems that I can solve (with the answers)? I have ...
0
votes
0answers
102 views

Choosing a new programming language to learn [closed]

I'm a Microsoft Stack(ASP.NET, C#) developer. Mainly, I develop server side software, windows services, restful apis etc. My client side interaction is really really low. So aside from C# I want to ...
3
votes
3answers
641 views

Why C# is not statically typed but F# and Haskell are?

There was a talk given by Brian Hurt about advantages and disadvantages of static typing. Brian said that by static typing he don't mean C#, but F# and Haskell. Is it because of dynamic keyword added ...
3
votes
2answers
218 views

Best way to store motion changes to reduce memory

I am comparing jpeg to jpeg in a constant 'video-stream'. i am using EMGU/OpenCV to compare each pixels at the byte level. There are 3 channels to each image (RGB). I had heard that it is common ...
1
vote
1answer
107 views

Ping one remote server from another remote server

It's simple to ping a server in C#, but suppose I have servers A, B and C. A connects to B. A asks B to ping C, to check that B can talk to C. A needs to read the outcome. Now, first of all is ...
1
vote
1answer
166 views

Is ZeroMQ a good choice to make a Python app and a C# managed assembly work together?

I have a task that involves talking to a .NET-based API (namely AutoCAD) to retrieve data, send commands, and react to events. I want to separate the API operations and the proper program logic ...
42
votes
15answers
4k views

How much freedom should a programmer have in choosing a language and framework?

I started working at a company that is primarily a C# oriented. We have a few people who like Java and JRuby, but a majority of programmers here like C#. I was hired because I have a lot of experience ...
0
votes
2answers
77 views

Using lucene and sql server togheter. Newbie needs directions [closed]

Basically the whole thing can be explained simply: I need to index one or more SQL Server 2005 databases with lucene so I can search the various records. I found a lot of examples and documentation ...
1
vote
2answers
151 views

Dependency injection with Finite State Machines and the Interface Segregation Principle

I am trying to figure out what is the best way to setup a FSM and also keep my interfaces clean and use an IOC container to use DI. Let's just visit the Head First design pattern textbook example of ...
3
votes
0answers
66 views

Is there an easy way to alter text colour based on background colour? [migrated]

I have a menu whereby a user can select colours, I display them like this: Because I write the colour codes in black, the dark blue background makes it difficult to read and the black is obviously ...
-1
votes
1answer
325 views

Why would one prefer C# (ASP.NET MVC) or Java (JSP) instead of PHP for web applications/projects [closed]

I'm wondering, why would one (consider it not just a single developer, but a company) prefer C# or Java for web applications? What's their considerations regarding the question. I mean, a company, has ...
0
votes
1answer
225 views

Interview for job that uses skills you have no experience with? [closed]

I am currently employed as a software developer using C# and C++. However, I want to find a new job for personal reasons and applied for a job ad that listed PHP, CSS, and Javascript as the skills the ...
0
votes
1answer
54 views

Choosing which application instance will do the updates when dealing with multiple workstations w/o server involved?

So, I've got an interesting design problem and I honestly don't know how to tackle this. I have an application that will be ran on a dozen of workstations. Of those workstations, it is impossible to ...
-3
votes
0answers
33 views

Displays but does not print? [migrated]

I am trying to print a document like shown below The title in bold and the rest of the text in regular font style. This is the print preview! The problem is, after printing, the title in bold does ...
1
vote
0answers
77 views

Steps to be a better Developer [closed]

I am a current .Net Web Developer (mostly C#, but I know VB.Net as well) and am looking to strengthen my development skills. I have been a full-time Application/Web Developer for 3.5 years now, and ...
1
vote
0answers
77 views

How do I create a DLL to consume a web service (Web API, C#, visual studio 2012)? [migrated]

I have a task to create a DLL that will consume a web service. The web service will contain a couple of functions - retrieve a list from a database, and check if a user was active on a particular ...
1
vote
0answers
28 views

golang channel in C# [migrated]

I have tried to mimic golang channels in C#; and it's performance is pretty good compared to golang itself. On may machine, each channel operation of golang takes ~75 nano-sec and each Chan<T> ...
0
votes
2answers
119 views

ASP.NET MVC create a draft without persisting to DB

I have a requirement to allow users to suggest updates to their profiles on a site I'm working. They would be able to view their profile details, then click on and "edit" button, which would basically ...
0
votes
3answers
109 views

Class or Dictionary

I want to create a immutable Scale class in C#. public sealed class Scale { string _Name; string _Description; SomeOrderedCollection _ScaleValueDefinitions; Unit _Unit // ...
0
votes
1answer
213 views

C# Design for SQL connection and commands

Currently I'm working on system that works with database, and I would like to have it done elegant way. So I have abstracted DBConnection into one class, DBCommands into another class. (DBCommands : ...
12
votes
3answers
490 views

Rich Domain Models — how, exactly, does behavior fit in?

In the battle of Rich vs. Anemic domain models, the internet is full of philosophical advice but short on authoritative examples. The objective of this question is to find definitive guidelines and ...
4
votes
2answers
248 views

What does “because IL offers no instructions to manipulate registers, it is easy for people to create new languages” mean?

I am reading CLR via C# and came across this sentence in the first chapter and I did not understand what exactly it meant. Full line here: because IL offers no instructions to manipulate ...
2
votes
0answers
141 views

How to add methods to a class without changing the COM+ Class ID [migrated]

I am writing some code in a dll that must conform to certain specs. One of those, is that it can only use the methods, enums, classes, etc that it currently has. The specification of all one method ...
5
votes
3answers
327 views

What the best way to wire up Entity Framework database context (model) to ViewModel in MVVM WPF?

As in the question above: What the best way to wire up Entity Framework database model (context) to viewModel in MVVM (WPF)? I am learning MVVM pattern in WPF, alot of examples shows how to implement ...
9
votes
7answers
56 views

Nested Entities and calculation on leaf entity property - SQL or NoSQL approach

I am working on a hobby project called Menu/Recipe Management. This is how my entities and their relations look like. A Nutrient has properties Code and Value An Ingredient has a collection of ...
1
vote
2answers
187 views

Entity Framework and distributed Systems

I need some help or maybe only a hint for the right direction. I've got a system that is separated into two applications. An existing VB.NET desktop client using Entity Framework 5 with code first ...
3
votes
0answers
39 views

Entity Framework and distributed Systems

I need some help or maybe only a hint for the right direction. I've got a system that is sperated into two applications. An existing VB.NET desktop client using Entity Framework 5 with code first ...
3
votes
5answers
395 views

What's the most effective way to share code between .NET applications?

In our work, we have several different .net applications that share a lot of base functionality. We've built these applications using a clean n-tier architecture, but we've hit that moment where we ...