My C# app contains a Data Object like this:
public class Data
{
public class a {get;set;}
public class b {get;set;}
}
public class a
{
public int first {get;set;}
}
public class b
{
public int second{get;set;}
}
I initialize my data when the application starts and my data changes evey time the app is running.
I have...
I was curious how the StringBuilder class is implemented internally, so I decided to check out Mono's source code and compare it with Reflector's disassembled code of the Microsoft's implementation. Essentially, Microsoft's implementation uses char[] to store a string representation internally, and a bunch of unsafe methods to manipulate...
I'm wondering when to divide code, and components of a project into a separate project. I'm creating a MVC .NET Web project, and there are many directories/sub-directories, and I haven't even started getting into some of the background processes that will take even more space.
I'm just trying to work on organizing projects and the code...
I am in the hypothetical phase of thinking of how to do something in code, so I have no concrete code examples yet. But, let's assume you have an entity type Person (with attributes such as first name, last name, DOB, etc.). When one goes to edit a person entity, you may only update one or two fields (possibly all, but usually not). T...
Hello SO,
This question concerns XML schemas and files.
Suppose I am developing a desktop application with a file-based interface, i.e. the user stores their progress in a file on disk - pretty standard for the vast majority of productivity applications and many more besides. The file is fundamentally XML, whose schema is stored by som...
Here is your basic DataSource override:
public override object DataSource
{
get
{
return base.DataSource;
}
set
{
base.DataSource = value;
}
}
What I would like to do in the setter method is cast value to IEnumerable<> and do some manipulations on i...
Hi
We have a requirement in which we need to change change the words or phrases in the sentence while keeping its meaning intact. This application is going to provide suggestions to users who are involved in copy-writing.
I don't know where should I start... we have not yet finalized the technology but would like to do it in a Python o...
I written a C# tool that simulates a user interacting with a Windows 7 environment. It works except when interacting with a couple online flash applications. Mouse movements and clicks are being generated, but the Flash apps do not receive them. I am thinking I need to generate lower-level mouse events, but cannot confirm this.
I hav...
I need to inject a custom, unique, static string into my .NET based EXE. For all intents and purposes, assume that this is my Private key of a PKI.
I have a few ideas on how I'll approach protecting the Private key within the C# source code, my question is how do I take my .CS files and create an executable based off it?
...
If Ngen doesn't protect my application, when would I reasonably expect to use this application in my career?
...
I have a couple of generic lists with completely different types of data.
In my generic lists I have created methods to do all the processing that makes sense from that level - that is I have the member function perform a summary and return a value or set of values. One of my reasoning for basing this calculation in the generic list is ...
I simply want to speed up my .NET-base client side app and am considering NGEN-ing the code.
Jeffery Richter wrote this warning about ngening code:
•Inferior Load-Time Performance
(Rebasing). When Windows loads an
NGend file, it checks to see if the
file loads at its preferred base
address. If the file cant load at its
pre...
I recently finished this book on Managed C++, and found it very interesting... But I realize the topic is woefully out-of-date now, with the advent of C++/CLI.
So I'm looking for recommendations on a new book to read, something to update my knowledge of C++ and .NET. I'm especially interested in writing server applications (using socke...
Hi everybody,
Entity Framework allows to map the result of a stored procedure to an Entity easily. What I need is to map an Entity to input parameters, so that instead of
context.SaveUser( user.FirstName, user.LastName, ... );
I can simply call it like this:
context.SaveUser( user );
What I really want is to isolate possible schem...
Based upon your experience
If you was given the opportunity to set up the development processes for a small development team.
Please detail
The things you would implement, tools, documents, methodology.
And how you would implement these?
I wish to implement the following:
Source Control
Bug tracking database
Formal Spec template...
How can this query be transform to linq
SELECT materialId, SUM(totalAmount) as quantity FROM Inventory
It's the sum part that I don't know how...
query = from inv in context.Inventory
select new MaterialQuantity()
{
MaterialId = inv.materialId,
...
Hi there,
Could you please drop here a few links to software developer sites or blogs that accept software reviews or articles?
BR
Murat
...
i try to compare two class comp1,comp2 i used method below: ComparerCollection(array_X, array_Y); but there are errors below. Arraylist generated from Ilist. how can i do that?
namespace GenericCollecitonComparer
{
class Program
{
static void Main(string[] args)
{
myClass comp1 = new myClass() { ID ...
I have a few dll files and I want to export all public classes with methods separated by namespaces (export to html / text file or anything else I can ctrl+c/v in Windows :) ).
I don't want to create documentation or merge my dlls with xml file. I just need a list of all public methods and properties.
What's the best way to accomplish...
What is the proper way to initialize a null variable in .NET? I've been told by one of my colleagues that hard defining of a variable to null is a slowdown.
int var1; // good practice
string s1; // good practice
int var2 = 0; // bad practice
string s2 = null; // bad practice
Is that correct?
...