.net

Debug released managed code (.net 3.5) using a dump file

Our application started to have some strange performance problems in the production environment. Constant CPU usage, although the app doesn't seem to be doing anything, and high memory usage. We've created a dump file of the process using the Task Manager's feature. Now we're trying to debug it, but it doesn't seem to be that easy :) V...

Serialize/deserialize DataSet (as a way to backup my data)

Hi all, I have written the contents of a table in my database to the disk using the following function. private static Stream GetTableAsBinary(string table, OleDbConnection oleDbConnection) { var oleDbDataAdapter = new OleDbDataAdapter(string.Format("select * from {0}", table), oleDbConnection); var dataSet = new DataSet(); ...

Does System.Net.Mail.SmtpClient support CRAM-MD5 authentication?

Does System.Net.Mail.SmtpClient support CRAM-MD5 authentication, and if so, do I need to do anything to enable it? MSDN appears to be silent on the matter. ...

Categorizing properties of XAML activities

Using a code activity (i.e. activity built out of C#) we can add category attributes to our properties and display them nicely in the property grid of the workflow designer e.g. [RequiredArgument] [Category("Input")] public InArgument<Guid> TermbaseId { get; set; } Is the same functionality possible in an XAML activity? E...

how to call wcf service from Iphone

I want to develop a system that a Iphone application can access my database through the wcf service. I am new wcf services and i want to know which service should i make (rest or ?) and why and they communicate with each other? ...

A component/tools of knowledge based modeling for .Net

I have had an idea of knowledge based modeling for a long time and I have surfed internet and couldn't find a suitable component/tools for .Net development to do so. My expected features are: Knowledge based. There is a central repository to store templates of classes, interfaces, properties and attributes. We will use these templat...

Chinese CultureInfo

Chinese CultureInfo is "zh" (zh-CN and others). But I can't find what does "zh" stand for? ...

Open Source Math Library for F#?

Can anyone recommend a good math library for use with F#? I am looking for the moment for something with statistical distributions, but obviously as needs grow, a fuller library will be useful. Something not unlike Numpy for Python for example. I searched and came across the Math.Net project.. They have a new library math.net which see...

VB.NET: impossible to use Extension method on System.Object instance

Can I make an Extension method for all the subclasses of System.Object (everything)? Example: <Extension> Public Function MyExtension(value As Object) As Object Return value End Function The above functions won't work for object instance: Dim myObj1 As New Object() Dim myObj2 = myObj1.MyExtension() The compiler does not accept...

Are there limitations when using unsafe code in .NET?

I see the allow unsafe code option in .NET. Only one of my apps have it set so i can copy an image to a bitmap quickly. Will there be limitations now that i checked off that box? mono seems to run it fine on linux. I dont see any problems so far. ...

How to use fn:max in SelectSingleNode

When I run this: XmlDocument xmlResponse = new XmlDocument(); XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlResponse.NameTable); nsmgr.AddNamespace("fn", " http://www.w3.org/2005/xpath-functions"); xmlResponse.LoadXml( "<LIST>" + "<ITEM NUMBER='3' TEXT='C'/>" + "<ITEM NUMBER='2' TEXT='B'/>" + "<I...

Performances for a Sql Server query or stored procedure to fill lot of data

Hi, It is a question for SQL Server 2008 and .NET code. I am wondering what you think in terms of performances, design between these two options to insert a lot of data (>250,000 rows, 5 “normal” columns) into a table using a transaction. a. Insert Into statement surrounded by transact statement in the c# code. Or b. Insert Into ...

Objectiv-c Soap request to a .Net Webservice

hi, i am programming a client in objectiv-c for the iphone which should use Soap for the communication with the .Net server. I have a big problem and hope that somebody can help me. I send a request with no errors and get a response, but a false response. in my request i put paramters calles "wo"(= where) and "was" (=what), but the resp...

Pause/Resume thread whith AutoResetEvent

In this code I want to Pause/Resume a thread using an AutoResetEvent and a bool variable. Is is possible to Pause whithout testing each time (in for loop of Work()) if blocked==true? Testing of "blocked" variable needs locking also and i think this is time consuming. class MyClass { AutoResetEvent wait_handle = new AutoReset...

Display first N numbers of a string using HtmlAgilityPack

This is my class which doesn't seem to do anything. I got it from this website a few days back. My aim is to be able to call it and pass a number, which will then allow me to show only the number of words as specified in the call. e.g first 2000 words of a long string. using System; using System.Data; using System.Configuration; using S...

how to use a ContextBoundObject to intercept a function call before/after the invocation?

I have read this article and I can't find a good example for how to use a ContextBoundObject to intercept a function call. Can anyone show me how it's done? Also, a side question: Why can't I use a ContextBoundObject with a generic class? I am asking accroding to this msdn reference ...

Array Clone bytes 10-40?

Is there a way i can do var splice = byteArray.Clone(offset, length); ...

Should I implement my own connection pooling scheme?

Should I write my own connection pooling scheme? (Question rewritten again so I can upvote peoples answers) ...

i want to convert speech to text in WPF . How can i do this ??

i want to convert speech to text in WPF . How can i do this ?? I m new in this please guide me ?? How can i start my project ?? ...

Exceptions not being thrown in .net

Hello, I turned my pc on this morning, and when I started testing some apps, I noticed that no exceptions are thrown (no dialog or anything). The code just stops executing and nothing happens! Example: private void Form1_Load(object sender, EventArgs e) { throw new Exception("error"); //anything below will not execute } visu...