.net

Can a WCF contract use multiple callback interfaces?

I'm trying something like this: [ServiceContract ( CallbackContract = typeof (CallbackContract_1), CallbackContract = typeof (CallbackContract_2), CallbackContract = typeof (CallbackContract_3)) ] public interface SomeWcfContract { I know it does not work like this. Is there still a way to get a single contract use multipl...

Why can't I override and new a Property (C#) at the same time?

According to this question it seems like you can do this for Methods. What I want to know is why it doesn't work when I try it with properties. public class Foo { public virtual object Value { get; set; } } public class Foo<T> : Foo { public override object Value { get { r...

Problem in sort by date in multi array?

I want to sort array A based on values in Array B actually in Array A I have topics like keyboard Laptop Desktop mouse and in Array B i have dates associated with each value in Array A how i can achieve this....I was thinking of using multi array but i m not sure if there is any default method of sorting multi array ...or if there is...

Is there an easy way to convert a number to Indian words format with lakhs and crores using C#

As the title suggests I would like to convert a long number to the format with words using C#. The Culture settings don't seem to do this and I am just currently doing this String.Format(new CultureInfo("en-IN"), "{0:C0}", Price) But for very long numbers I would prefer the word format. I am not from India and only vaguely familiar wit...

How to start with NOSQL using .net programming languages?

just was reading this article http://highscalability.com/blog/2010/3/23/digg-4000-performance-increase-by-sorting-in-php-rather-than.html And found this nice article http://wiki.apache.org/cassandra/DataModel I just want to know as a .net developer how to deal with NOSQL, and somethings like cassandra. I found that cassandra is apache...

How to get characters read from the keyboard?

Hi, I am trying to get the characters read from the keyboard into some variable for further manipulation. I have the following list that I wish to recognize if entered by a user. List of keyboard entries: letters [ ] ~ ^ numbers Part of the code: void HookManager_KeyUp(object sender, KeyEventArgs e) { string test = e.KeyC...

How to resize Large image in NetCF?

I got out of memory exception when I try to load a 1MB image into a PictureBox to display on NetCF. Would appreciate someone can provide me some help. Thanks ...

.NET Setup Package Installer

Hi, I have a .NET 3.5 Setup Package Project which installs my application successfully. The setup package deploys a number (around 70) custom files for use from within the application. From time to time I have the requirement of deleting some of these files, however upon restarting the executable, it automatically runs a portion of th...

Custom web.config in Visual Studio Setup Project

Hi, In the Setup Project I have 2 web.config files: web.config - used during the development and web_dist.config - the one that should be included into Setup Project. I must be sure the the Setup project will NOT include the web.config and will always include web_dist.config. In the File System -> Web Application Folder I have added t...

WM6.5 embedded Internet Explorer finder scrolling

I'm writing a .NET 3.5 application targetted for Windows Mobile 6.5. My application uses an embedded IE control to display content. The IE application allows the user to finger scroll around the webpage (i.e. touch the screen and drag instead of using the scrollbar). My IE control has a scrollbar and when I emulate the gesture, I high...

casing the object values

Hai am using telerik wpf grid in grid selection change event am getting the selected row values. the problem is the values are as object. object myData = radGridView.SelectedItem; the object myData contains the row values. but i don know how to get values from the myData object ...

Can I use Linq to project a new typed datarow?

I currently have a csv file that I'm parsing with an example from here: http://alexreg.wordpress.com/2009/05/03/strongly-typed-csv-reader-in-c/ I then want to loop the records and insert them using a typed dataset xsd to an Oracle database. It's not that difficult, something like: foreach (var csvItem in csvfile) { DataSet.MYTABLED...

Microsoft Training in .NET

Hey guys, A quick question about training. My company are offering to put me through a 5 day course in .NET programming with C#, on the proviso that I work for them for a minimum 12 month period immediately after the training has been completed. IF I don't work for them for 12months I will be expected to pay them back teh cost of the t...

What is the best way to download files via HTTP using .NET?

In one of my application I'm using the WebClient class to download files from a web server. Depending on the web server sometimes the application download millions of documents. It seems to be when there are lot of documents, performance vise the WebClient doesn't scale up well. Also it seems to be the WebClient doesn't immediately clo...

Updating DataGrid From a BackGroundWorker

I hava a Background Worker and a DataGrid in my c# Application. In do work of my Backgroundworker which will call an Api in my dlls which will enter some Data in a SQLite Database. After the Completion of my Api call I report a progress and In progress event of my Backgroundworker I get the contents from Db and assign it as a DataSourc...

How would I best address this object type heirachy? Some kind of enum heirarchy?

I'm curious as to any solutions out there for addressing object heirarchies in an ORM approach (in this instance, using Entity Framework 4). I'm working through some docs on EF4 and trying to apply it to a simple inventory tracking program. The possible types for inventory to fall into are as follows: INVENTORY ITEM TYPES: Hardware P...

Using Monitor Class

Dear All I would like to ask couple of Questions regarding the use of Monitor Class in .Net. To understand the Questions please look at the following Code. public class MyClass { private List<int> _MyCollection = new List<int>(); public void GetLock() { Monitor.Enter(_MyCollection); } public void Release...

synchronize sql connection in multithreading in .NET

I am using multi threading concept to run some process. this process uses the sql connection object to get the data from database.This object is in another class. how to synchronize the sql connection while using multithreading? ...

is there object generator working on JSON ? (just like XSDObjectGen.exe)

Hello. I have to serialize & desserialize json data. if the data type was XSD, I am able to create class by using XSDObjectGen.exe But , the data type I have to serialize is 'JSON'. Is there any good way to generate class for serialize & deserialize ? ...

Write-Through Cache

Dear All I am trying to do an C# implementation of Write-through Cache to minimize the read hits on db i need your suggestions, articles or sample codes to fulfill this assignment. Initially this would be use only on one server but will be updated to work in clustered environment. I only able to get a worth reading article on Oracle...