.net

Why does my project not get rebuilt and references in my unit tests not get updated when targeting x86?

I have a Console App created in VS 2010 targeting .NET 4.0. According to Microsoft (Rick Byers) AnyCPU is no longer the default for Console Apps because, in the Microsoft way, they feel like it is a better idea to default to x86. Also, the option to change the platform to AnyCPU, or x64 for that matter, does not seem to be available. ...

Open source mathematical expression parser?

I googled and came up blank - so it's time to test the good folks at SO again! :) Can anyone recommend an open source library (pref for .NET) that parses and calculates mathematical expressions? e.g. input expression = "2+(n-1)*4", parameter key/value n=2, output = 6. ...

How does google mail implement the new upload functionality with html5?

I noticed while using Firefox and Chrome that in gmail I can now simply drag & drop multiple files in a new mail. Then suddenly a bar grows and I can drop the files there and they get uploaded. I think this is html5 functionality. Does anyone have information about how to implement this? What is needed from html5 and how to handle it se...

Video chat / conference SDK for .NET that WORKS?!?

After googling and binging for a whole day about this, and even trying some stuff unsuccessfully, I'm giving up, to ask you guys this question - Is there on this planet a viable, downloadable SDK for .NET which one can use, out of the box, to add IP to IP (peer to peer) video conference / chat (or whatever people call it) to one's .NET...

Exception handling in FitNesse

This is a FitNesse beginner's question, so bare with me. Gojko Adzic, in his book Test Driven .NET Development with FitNesse, gives some basic tips on reducing the test code. There's a method called LogIn which, based on the username and password, returns player's id or throws an exception when there's no such registered player. Here's t...

Why .NET exceptions are mutable?

I'm wondering why .NET exceptions classes from Base Class Library has some mutable members by default Why I can change the Source, HelpLink and values from Data, but can't change anything else like the Message? Why throwing the exception rewrites the StackTrace making it mutable too? Is appending the stack trace information to existing...

How can i fill 1D array from 2D array and how can i sort 1D array?

hanks everybody to help my idiot problem (look my before post:) ) . But i exactly need below. I should fill 1 dimentional array from legth of per cell Datatable. and sort 1D array linq and also without linq int[][] lengths; using (DataTable table = GetTable()) { lengths = (from DataRow row in ta...

SQLite Used to Populate a ListView in WPF C#

I have an SQLite database with over 100,000 records. I need the data to fill a ListView in my WPF project. I'm using System.Data.SQLite. What's the (best) way to get this setup so it works using virtualization? Also, what's the best method to filter the list view based on key word searches? I'm aiming for maximum speed. ...

ObservableCollection slicing using lambda

I have ObservableCollection<ViewUnit> _myItems field, where ViewUnit implements INotifyPropertyChanged. ViewUnit has Handled : bool property. The main view of WPF application has a ListBox which binds to _myItems. I want a separate view of non-handled items only, that is, to have an IObservableCollection<> depended on existing _myItem...

Timing İssue in ASP.NET

Hi Everybody, I am developing an asp.net project and in this project I have used a countdown timer. I writed my countdown timer in jquery. It works very well. On the other hand when I clicked another page in my project then open the countdown page. My countdown timer should not be restarted. It have to continue count down properly. I t...

MySqlCommand call function

I am using the MySQL Connector. using (MySqlConnection connection = new MySqlConnection("...")) { connection.Open(); MySqlCommand command = new MySqlCommand(); command.Connection = connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "FN_NEW"; command.Parameters.AddWithValue("P_SES...

Difference between [...]Async and Begin[...] .net asynchronous APIs

Can anybody explain me what is the difference between the Begin[...]/End[...] asynchronous API pattern and the later [...]Async pattern in .NET 3.5? Why was the later created? Why would one prefer one pattern over another? For example, Socket.BeginAccept() and Socket.AcceptAsync(). ...

Why does subscript 2 not appear on Windows XP?

I am trying to display CO2 in a static text control on a .NET application, but on some Windows XP system, the subscript-2 (unicode 2082) appears as a square). I suspect that it may be a font issue as it appears on some Windows XP systems but not on all. It always displays on Windows 7 and Vista. It's available on MS Gothic font. Ideas ve...

I'm a Linq-to-SQL rookie, but I'm looking into Entity Framework. Is it much harder to use?

For example, one of the joys I've learned from L2S is that when creating the .dbml file, it automagically lets me create object of the Table with fields of the table columns. I do absolutely nothing and I can query things using a very natural approach using Linq and lambda expressions. I've also been told that L2S doesn't work with many...

What is the best way to store WMD input/markdown in SQL server and display later?

I'm looking at using WMD in my project instead of my existing RadEditor. I have been reading a few posts on how to store and retrieve the data, and I want to make sure I have the concept correct before proceeding. If my research is correct, here is what I should be doing. I should store the editor data twice (Once as HTML and once as...

How to get a reference to an instance of a derived class from within a base class

.Net 3.5, using C# I have an instance of a class (A) that has been called via a virtual method from a derived class (B). Within the method (a method of class A) I have discovered the Type of class B that has made the call, and using reflection I have examined class B and discovered a property whose value I want to access. Is there any ...

Looking for a file-based cache on .NET / Key-Value Store with expiration

I'm looking for some convenient way to cache data on disk. Basically a key-value store with expiration and the value being (xml)serialized . Something that could be used like... var userCacheId = "3332"; var userData = cache.Retrieve( userCacheId, () => readUserDataFromDatabase(userCacheId), // Load delegate if not in cache ...

Read HTML Body from Outlook MSG file

How can I read the HTML body from an Outlook.MSG file using Delphi code. I have been using Scalabiums smmsg component, but it only the body text returns a value, the the html body property always returns an empty string. Thanks, Phillip. ...

.net loop through methods in a class

I've got a Class with an undetermined number of methods inside Public Class MyClass Public Sub Foo() End Sub Public Sub Bar() End Sub End Class Is there an easy way to call all of the methods in "MyClass" without physically specifying each one? The reason for this is that the methods within "MyClass" are going to be ...

Exchange 401 Unauthorized

I am trying to connect to our exchange 2007 server. I have placed lots of exception handling to catch any errors and put them in the application log. Firstly, I have a function which ensures that a user can access the exchange service with the provided credentials: public bool Logon() { string pwd = /*Get password*/; try ...