C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform
5
votes
4answers
383 views
Storing data in code
A few times in my past I've wanted to store data in code. This would be data that seldom changes and is used in places where access to a database isn't possible, practical, or desirable. A small ...
0
votes
3answers
208 views
Building one way chat?
I'm implementing a Windows 8 app using C#, part of it is One Way Chat. It will be for multiple users such as teacher and student. We want to use a chat room for every course.
Teachers teach different ...
1
vote
3answers
170 views
File storage for a blog component: database or filesystem?
I'm going to develop a fairly basic re-usable blog component, with simple CRUD operations using ASP.Net.
Which method of storing blog posts would be best suited to the situation in terms of ...
9
votes
2answers
195 views
I should have used a factory method instead of a constructor. Can I change that and still be backwards-compatible?
The problem
Let's say I have a class called DataSource which provides a ReadData method (and maybe others, but let's keep things simple) to read data from an .mdb file:
var source = new ...
4
votes
5answers
228 views
How can I test parts of my application against the output of third party application?
I have a fairly new C# application, approximately 6 months old, that we are now trying to incorporate testing into. (Should have been done from the start but I can't change the past)
Parts of this ...
1
vote
0answers
42 views
COM Interop & DI : Where to bind?
Recently I have "discovered" the virtues of dependency injection and I absolutely love the way it has affected my code - all the pieces are simple, focused and decoupled; I can now mock all the ...
-1
votes
0answers
72 views
3D Viewer for .Net [closed]
I'm looking for a convenient way to display 3D models. The application itself is going to be based on WPF and .Net.
The requirements are:
displaying 3D models, and manipulating these models. ...
0
votes
0answers
52 views
Extension objects pattern
In this MSDN Magazine article Peter Vogel describes Extension objects partten.
What is not clear is whether extensions can be later implemented by client code residing in a separate assembly.
And if ...
1
vote
2answers
168 views
Approach of delivering “Logging API”
I faced a question in a .NET interview.
As a client i need a LoggingAPI. How you go the approach of design and development and delivering Logging API to the client? I don't care about WPF or a ...
0
votes
1answer
70 views
C# Object reference not set to an instance of an object [closed]
I'm making a simple Contact Manager as a practice project based on a XML file everything is working just fine except for two problems
Every time I click on the white blank space on ListBox, I get ...
1
vote
2answers
144 views
Why DependencyProperties and not native language support?
With advent of WPF and MVVM Microsoft introduced DependencyProperties and INotifyPropertyChange interface to provide a way to implement the "reactive" approach used with those technologies.
Sadly ...
2
votes
4answers
254 views
To open source or sell? How to choose? How to proceed? [closed]
I just wrote a little C# application to sort my MP3 files. I was tired of thinking "Didn't I just hear that artist?" or "How many times do I have to listen to 'The Way You Look Tonight?' (for ...
1
vote
0answers
32 views
Autofac dependency injection implementation
I started working on a new project and I come from a direct and 'naive' programming.
Right now I'm concerning about using IoC container, specifically on Dependency Injection patter using Autofac.
...
2
votes
0answers
33 views
Data transfer between“main” site and secured virtual subsite
I am currently working on a C# ASP.Net 3.5 website I wrote some years ago which consists of a "main" public site, and a sub-site which is our customer management application, using forms-based ...
1
vote
0answers
14 views
Move ClickOnce Application to New Server [migrated]
I'm not sure f i'm in the right StackExchange, but i'll post it here none the less. We have 2 application servers (Server 1 and Server 2.) We have signed manifest files with our application on both ...
4
votes
1answer
86 views
Which technologies to create web interface for scientific instrument?
I am working on software for some scientific instrumentation. An embedded computer running Windows 7 is inside the instrument, which controls various components of the device; cameras, motors, ...
3
votes
4answers
209 views
Is it a good practice to create a ClassCollection of another Class?
Lets says I have a Carclass:
public class Car
{
public string Engine { get; set; }
public string Seat { get; set; }
public string Tires { get; set; }
}
Lets say we're making a system ...
0
votes
6answers
286 views
Wise way to implement a website login and database tables for a small shop
Im building this website for a small store and I was told that its better not to keep the login and the rest of the users information on the same table.
Now im wondering, what is the best way to ...
0
votes
0answers
16 views
Wise way to implement a website login and database tables for a small shop [duplicate]
Im building this website for a small store and i was told that its better not to keep the login and the rest of the users information on the same table.
Now im wondering, what is the best way to ...
2
votes
3answers
129 views
In a module-core program, how should modules interact with each other?
Short background: I'm using MEF/C# for developing a program that has one core (singleton) and multiple MEF parts (I call them modules, each module is a separate assembly with one class that contains ...
0
votes
0answers
37 views
T-SQL Issues With Defining 'AS' [migrated]
I am creating a fully dynamic application but have ran into a bit of a hiccup. There are multiple 'undefined' fields that can be defined by the users. The only problem is redisplaying them. Currently ...
0
votes
0answers
108 views
Why does my property have a line through it on intellisense? [migrated]
When i access a property through intellisense, sometimes it has a line through it like so :
Why is this happening? is it deprecated?
4
votes
6answers
617 views
What is the best way to prove that in-code documentation is greater than extensive external documentation?
What is the best way to prove to my boss that in code documentation is greater than extensive external documents containing documentation and screenshots of code/ui?
We have a group in the company ...
6
votes
1answer
143 views
Naming of related classes and interfaces
I have created an ObjectParser class which parses data into strongly typed objects using an IObjectParserDataSource as the data source (the data could be an Excel file, text file, array, query string, ...
1
vote
0answers
45 views
Testcase runner for parametrized testcases
Let me explain my situation. I'm planning a kind of test case runner for doing testcases on external devices, which are microcontroller based. Lets consider the devices:
Device 1
Device 2
There ...
0
votes
0answers
30 views
Visual Studio UML reference to another modeling project
I am creating several components and have broken them into different class diagrams / modeling projects. I have to do this because a single diagram simply isn't big enough. Is there a way for a ...
-1
votes
1answer
79 views
What is the common knowledge expected from a common ssr C# developer? [closed]
I was asking myself, there are many technologies on Java that a semi senior developer could be expected to be able to handle. Maybe Spring, Struts, etc.
However, I couldn't find an answer to that on ...
3
votes
4answers
319 views
How to encapsulate 'global' variables in C#? /best practice
In C# what is the best practice for encapsulating variables I need to use in multiple methods? Is it OK to simply declare them at the top of my class above the two methods?
Also if I am using app ...
-1
votes
0answers
11 views
C# The multi-part identifier “System.Data.DataRowView” could not be bound [migrated]
I have a table that populate Combobox1 and Combobox1 should populate Combobox2 and this is where the problem is.
That's the exception i'm getting
The multi-part identifier "System.Data.DataRowView" ...
-1
votes
0answers
124 views
What are the key differences between C++ and C#? [duplicate]
What are the key differences between C++ and C#? and is one better over the other for game development? if it helps to answer my question: I don't know any languages, but I hope to learn one of the ...
6
votes
4answers
424 views
Should I Do Calculations in T-SQL or Program?
I am creating a stored procedure that is logging some data. The data ultimately needs to end up in 2 tables. The incoming data is coming from a JSON string containing 15 parameters, and the data is ...
1
vote
0answers
154 views
Is there a better way to consume an ASP.NET Web API call in an MVC controller?
In a new project I am creating for my work I am creating a fairly large ASP.NET Web API. The api will be in a separate visual studio solution that also contains all of my business logic and database ...
1
vote
0answers
52 views
How do I return a C# web service that has a generic property? [migrated]
I am creating a web service, and want to be a bit more elegant with the return data, instead of having lots of properties that the consumer needs to check.
Depending on what data is generated behind ...
17
votes
4answers
729 views
Why doesn't C# have local scope in case blocks?
I was writing this code:
private static Expression<Func<Binding, bool>> ToExpression(BindingCriterion criterion)
{
switch (criterion.ChangeAction)
{
case ...
-1
votes
1answer
93 views
How can I run 'R' script for image processing on .net platform [closed]
I have made R script code for image processing. I want to run that script on .net platform. I want to use .net for front end design on which I can run 'R' script and do my image processing.
I have ...
-4
votes
0answers
31 views
Shorting in autocomplete [closed]
In my c# 3.5, window application I am facing with some sorting problem. Here is description.
Description
I have a table in that all the the data are stored.....
When I am retriving data from DB it ...
-1
votes
0answers
16 views
How do I cnect to a database and query my SP to view into a table after On_Click in C#? [closed]
I am trying to populate a data-grid/ and or table by clicking a button from my webpage.
At the moment I only learned how to bind information. Can someone please direct me in the right direction. I ...
-2
votes
1answer
77 views
Architecture for asp.net app in tiers with linq or any ORM [closed]
I would like your help on suggesting solution structure for my asp.net web app. I am thinking of using above technologies. I also want validation framework in my project. Please suggest me with some ...
1
vote
4answers
72 views
Should I create a separate table for every derived type?
We are having a debate and I am struggling to decide which side to come down on. Basically we have an event type lets say like like this (simplified example).
public class Event
{
public virtual ...
1
vote
1answer
108 views
Multi-user Configuration Settings design
I am designing a flexible and extensible way to store configuration settings for users.
Database Table Design:
╔═════════════════════════════╗
║ ConfigurationItemDefinition ║
...
1
vote
0answers
82 views
How to choose which schema design for a tree structured domain model
I have the following classes that I want to store.
public class StorableObject
{
public string Id { get; set; }
}
public class User : StorableObject
{
public string Name { get; set; }
}
...
0
votes
0answers
75 views
Syntax highlighting text editor for Mac that supports c# & asp [closed]
I primarily program on a macbook air. Occasionally I need to do some quick editing of sites built on .net. However these are usually not too complicated and I would like to avoid using virtualization ...
28
votes
5answers
951 views
I'd like to write an “ultimate shuffle” algorithm to sort my mp3 collection
I'm looking for pseudocode suggestions for sorting my mp3 files in a way that avoids title and artist repetition. I listen to crooners - Frank Sinatra, Tony Bennett, Ella Fitzgerald etc. singing old ...
2
votes
0answers
98 views
Using absolute paths for build dependencies
Currently we use Source Safe and start migration to Subversion.
All external SDK(> 500 MB) hold in Source Safe now, and I look for way to move them from VSS
to some repository.
We have C++ (mostly), ...
8
votes
4answers
345 views
In Unit Testing, why would I create a Repository twice?
The other day I was reading a little about Unit Testing and I saw some examples where people create a repository interface (i.e. IExampleRepository) and then create the real repository (public class ...
2
votes
2answers
287 views
Closest Point of Approach (CPA) mathematical formula in ship radar
I was recently searching for the mathematical formula to find closest point of approach (CPA) between one ship and another ship. I need to apply the formula in my radar ship program and I can't find ...
0
votes
0answers
5 views
Reversing the order of bytes in a file [migrated]
Hi I am trying to reverse the bytes of a file without loading the entire file into memory.So far I only managed to read the bytes of the file from the end to begining , but I am not sure if I am doing ...
0
votes
2answers
309 views
Choosing between Qt/C++ and .NET/C# [closed]
I have a desktop project I've been working on for a couple months that I want to run on Windows and Mac. When I started the project, I started writing it in Qt 4.8 in C++. Development has gone fine ...
-4
votes
0answers
54 views
I want to know about the architecture of virus guard and how to identify the viruses from it [closed]
I have some project to demonstrate operation of virus guard as a in class assessment in c# or c++.Then i want to know about the virus guards and its operation. Anyone can give me some idea or any ...
-7
votes
0answers
60 views
I want to know about the architecture of virus guard and how to identify the viruses from it [closed]
I have some project to demonstrate operation of virus guard as a in class assessment in c# or c++.Then i want to know about the virus guards and its operation. Anyone can give me some idea or any ...