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
1answer
55 views

will having an event with subscribers prevent an object from being GC'ed?

I have an object, which has an event which in turn has subscribers. I know that the subscribing objects won't get GC'ed since the delegate they stored for the event is connected to them, thus keeping ...
3
votes
2answers
195 views

How a VB6 programmer can update his skills and get qualified for the current job opportunities in the USA? [on hold]

I'm going to the U.S.A. and was wondering how I can get a job there. I've been a developer for 3 years. Well, I've been working on big projects like the core banking system of one of the biggest banks ...
0
votes
1answer
27 views

Problem : Certificate for multi Clients of WCF

If My WCF service have big number of clients through the Internet,then whether should all of them share the same Client Certificate(X509)? And if their certificates should be unique , what should I ...
0
votes
0answers
32 views

Generic data import framework architecture

I'm refactoring a generic framework for importing data from a number of different sources. I'm struggling a bit with the design and I'd really appreciate some input. The importing process typically ...
0
votes
1answer
51 views

Can GC.SuppressFinalize cause performance problems?

I'm being asked to implement IDisposable on objects that are 100% managed resources, which contain no streams, and no large resources. I understand the importance of properly disposing of large ...
0
votes
0answers
41 views

Microsoft certification exams for .Net developer (microsoft has changed exam names) [on hold]

I have already looked at this link. To tell the truth, i will preapre for exams on my own. I have already 2 years experience with .Net. I have read two books about C# from appress. One for ...
0
votes
2answers
53 views

Server should accumulate several requests and to retrurn response for all

For example I have a server [c#] and 4 clients. When the first client sends a request to the server I want to push a notification to the other 3 clients that they should send a request to the server ...
1
vote
1answer
54 views

How to handle a Restful Call in a RESTless state?

I have a bit of a dilemma. We are choosing our DBContext using a dynamic builder. This is done because in the current database structure we have a separate server for every "Customer". All of these ...
-2
votes
0answers
32 views

Webapp that shows a table

I have a C# web app that shows a database table on a webpage. I am not convinced that I'm doing this the best way and am looking for people's opinion on a better way to do this. Here's what I do so ...
0
votes
0answers
28 views

Populating Google Maps with Markers from C# List [migrated]

I am trying to populate a javascript google map with a c# list of google map markers. I can get data in from public floats but not from the list. The list will be populated by the database but in this ...
2
votes
1answer
105 views

Is there a way to use RAII techniques in COM?

I am caught between two conceptual models of how to construct objects, and am having trouble working out what standard I want to adopt. I prefer to program in .NET and often try to use RAII and ...
0
votes
1answer
42 views

Filtering common starting/ending characters from array/list of strings

Ok so for example I have an array of strings with each string as below: 364VMS1029 364VMSH920 364VMSH192 364VMSU839 364VMN2382 364VMR223 364VMR2X3 364VMN829 364VMN8757 364VMN831 How can I ...
0
votes
0answers
41 views

Writing a calculation application as services [on hold]

I want to write a big calculator. My calculator should post his results, people should be able to get calculations or see what an other user calculates. For that purpose I would use WCF-Services. I ...
0
votes
0answers
22 views

Encapsulate multiple properties into a single class to use as a custom DependencyProperty

My application is a WPF project implemented in C# .NET (4.5) using an MVVM architecture with no code-behind in the View. In order to eliminate the coupling between the View and the ViewModel I'm ...
-4
votes
0answers
48 views

what skills require to develop a application like skype [on hold]

Hi I want to create a chat application like skype. I have no Idea about it from where I start. I want to know that what skills are require to develop application like skype. May be this is out of ...
-3
votes
0answers
84 views

C# Implementing filtered Iterator without using yield return [migrated]

I'm trying to display elements of a list with filter and without filter. Here, I use the filter in such a way to display the elements which are divisible by 3. I'm going to use Enumerable and ...
2
votes
2answers
210 views

Why does C# allow properties in interfaces?

In C#, the following code is valid interface I{ int property{get;set;} } Which doesn't make any sense to me. This seems to break one of the most important principles of interfaces: lack of ...
19
votes
6answers
2k views

“Undoing” an integer wraparound

I ran into an interesting theoretical problem a number of years ago. I never found a solution, and it continues to haunt me when I sleep. Suppose you have a (C#) application that holds some number in ...
0
votes
1answer
78 views

Organizing Business and Presentation entities

Background I am developing a WPF project. This is the basic structure: User Interface (WPF Project); Interfaces (class library, contains all the interfaces and the entities used by the ...
2
votes
3answers
211 views

Duck typing in statically-typed languages

Is it a fair assumption to say that an overloaded constructor for a class can be thought of as a 'duck' for duck typing? Let's say that ClassA has an overloaded constructor, it would stand to reason ...
0
votes
1answer
53 views

C# Single Instance of a Form [closed]

I have 3 forms. Form 1 has information inserted into Form 2. After clicking a button on Form 2 to get to Form 3; on Form 3 I pull data and put it on Form 2. The problem with this is that I don't know ...
0
votes
1answer
64 views

Return tasks or expose events? [closed]

What is preferable when you program an API? And I have to add that in my case there will be two events exposed in spite of everything.
-2
votes
1answer
119 views

Implementing IEnumerator without using 'yield return' in c#

I'm new to C# programming, I was experimenting with iterators concept in C#. Here, I'm trying to display all the terms in a list, for that I'm trying different ways to obtain the results. In the below ...
4
votes
2answers
126 views

Deferred execution of Dispose for IDisposable objects

I'm working on an application that does lots of encryption and decryption in-application and this is probably the number-one bottleneck, so I've been spending some time making performance tweaks to ...
3
votes
5answers
232 views

Is it useful to keep 'definition' entities in a database vs using an enum?

In a project that I have started working on, the database has a lot of FooDefinition tables which act like an enum. It's a C# project using Entity Framework although that is not central to the ...
-2
votes
0answers
65 views

Program that calculates and displays resistance [closed]

The question is as follows: This problem is to do with electrical resistors, which 'resist' the flow of electrical current through them. An analogy is a hosepipe , a thin one has a high resistance, ...
0
votes
1answer
123 views

Onion Architecture Structure

I am looking to understand and implement the Onion Architecture and have a vague idea on how to structure everything but need help to clear up some of my confusion. Based on different examples and ...
2
votes
3answers
314 views

What is a good design for a method that can return several logically different results?

The question title is probably too abstract, so let me provide a particular example of what I have in mind: There is a webservice that encapsulates a process of changing passwords for users of a ...
-2
votes
1answer
86 views

Should I as a junior-programmer pursuit a course in C#, even though I did Java? [closed]

I'm a junior-programmer, and at present I am pursuing a course in I.T. which involves getting to know Java and JavaScript. Should I pursuit a course in C# also? I really like programming, but I had a ...
0
votes
2answers
140 views

Comparing two software versions in C#

I´m working on a mod update checker for minecraft, but there is a big problem: The modders and online database that I´m using for update checks has no standard software versions e.g.: Local: ...
2
votes
1answer
80 views

If the UI layer depends on the Application layer. Who starts the application/process?

This is related to DDD for a desktop application in c#...with 4 layers ui/application/domain/infrastructure. Actually 3 desktop applications sharing part of the domain and part of the infrastructure. ...
0
votes
1answer
127 views

Solution for multiple versions of one Software

I'm sorry if the title is a little hard to get. I've never built an entire big software my self, just some small apps in my free time, i was more familiar with the do-what-my-boss-told-me things. ...
2
votes
2answers
176 views

Best patterns for variable-scope disposables

I have Client which uses a disposable Connection for talking to a remote service. A Connection is somewhat expensive to set up and needs to be Dispose()d properly. I want to allow multiple methods ...
0
votes
2answers
233 views

Confusion in my If Else ,Else If Condition. in C# [closed]

I have three column as follows: Month Tech Circle According to this column I need to fetch the data. In Month Column, Data is : Jan,feb, March... and so on. In Tech Column, Data is : Gsmnqi, ...
0
votes
1answer
40 views

Organizing solution / project structure and classes for Line of Business Application (LOB)

The question how-do-you-organize-your-projects already has a few good answers. I would like to get a better understanding about this suggested structure: MyApp.Core MyApp.Model MyApp.Presenter ...
0
votes
0answers
34 views

TryUpdateModel vs Parameter and ModelState.IsValid

As I was originally learning about MVC, the book I was using taught the following technique for Controller actions: public ActionResult MethodName(Model model) { if (ModelState.IsValid) { } ...
1
vote
2answers
209 views

Do immutable objects that constantly change impact memory/performance?

I'm writing a program that goes into a loop and keeps changing the state of some models (similar to a game). Naturally, many things are mutable. However, I'm also writing some classes that are ...
1
vote
2answers
112 views

MVC/P in Desktop Application

I am developping a desktop application in C#, and have separated different layers in an MVC-ish architecture. As I have switched from GTK# to XWT, only views had to be adjusted, so the seperation of ...
0
votes
1answer
87 views

What design pattern should I use for import, update, export

I need to create a simple payments validator. On the following class diagram, I tried to present the model of payments. As you can see, each payment type inherits from Payments class. Now I want ...
1
vote
1answer
149 views

Are the over-usage of delegates a bad thing?

Good day. I have been told that a good practice for writing methods is to make the method only responsible for doing one thing. It made sense to me now that I look back upon it in retrospect. There ...
1
vote
2answers
126 views

Sanity check for design pattern used with an intricate calculation model

I am working on a project that generates technical brochures in batch. The 3rd party API that is being used expects POCOs with property names that match field names used in each of the brochure ...
2
votes
2answers
108 views

Wrapping constructor arguments

Given a base class with around 25 or so subclasses, I have found that adding an argument to the base constructor is painful. protected AbstractController(Service1 s1, Service2 s2, Service3 s3){ ... } ...
0
votes
0answers
10 views

Send users google oauth authentication to soap WCF Datalayer [migrated]

I have today a WPF application that, for sake of simplicity here, manages a few appointments, and when ready sends the appointments to a WCF datalayer for integration into a 3rd party calendar system. ...
0
votes
2answers
152 views

What is a class library? [closed]

I'm working on a lawsuit and I need a definition of a 'class library' that I can reference. Every book and all the documentation I can find seems to assume the reader already knows what a library is. ...
2
votes
2answers
122 views

Property or Method to obtain information about a collection?

Suppose I have a MyList class which extends ObservableCollection<MyObject> where MyObject has the Boolean Property Enabled. Let's say I want the number of MyObject objects that have the ...
1
vote
2answers
90 views

Setting fields with correct default value

When writing constructors, I regularly encounter a situation where some fields already have approperiate (default) values, such as false for boolean values and 0 for integers. What are reasons to ...
0
votes
2answers
95 views

In Asp.net, how browser knows a textbox is registered with server side TextChanged event?

When I evaluate asp.net control events, I am not able to identify how the browser is aware of asp.net textbox is subscribed to serverside textchanged event or not. When I look the server generated ...
1
vote
1answer
83 views

Linking to MIT-Licensed dll

I'm currently working on some closed-source proprietary software that makes use of a library (SharpAVI) distributed with the MIT License. The SharpAVI source isn't being used directly anywhere in my ...
0
votes
0answers
98 views

Why Doesn't SMTP Mail Attachment Dispose When Client Does? [migrated]

This is an issue that I recently solved, but was wondering if somebody could help clear this up for me since I don't fully understand what exactly happened. I created a simple smtp email client and ...
1
vote
3answers
250 views

Trying to come up with a mapping convention for C# objects

so this is C# but it could apply to any OO language where different sets of objects exist across different layers of an application. We have been trying to come up with a convention within the team ...