.net

Memory usage and time for execution for another process using C#?

I need the memory usage and processing time for an application loaded through another application. I am using C#. Currently I am using Process.WorkingSet to get memory usage similarly Process.TotalProcessTime to get time for execution, but it doesn't give any value. So have you make any suggestions? ...

What generates the SQL in Entity Framework?

I have tried to find this answer but cannot. What is generating the underlying SQL when using EF? Is it EF or the provider you are using? Also, is there any way to provide hints in order to change the way the SQL is generated? Thanks in advance ...

How to insert "empty" row into a DataTable?

I am using a DevExpress LookUpEdit control. My database has two tables that control the population of control options. One called MaintCategory and one called MaintItem. This introduces a Magic Number into my program(the CategoryID) but allows for lots of runtime customization. My problem lies in how to allow my users to un-select ...

View an record values of properties without debugging

Is there a lightweight way to watch and record the values of properties of arbitary instances in my .NET application? Preferably one that works for release builds too and without having to attach a full fledged debugger. Sort of like what Crack.NET does but with live updates, recording and most importantly, one that works with mixed mode...

Having problem to log into gmail ?

i want to login to gmail using asp.net ,however when i use the http post method with .... it returns your browser is not accepting cookies?...and in the internet explorer its sign's in ..whats the problem n what to look for ...And if any one has code how to login to gmail ...I will be very thankfull. ...

integration of flex/ssrs (Flex based UI for reports created in SSRS)

We have an application which is created in asp.net/flex front end, ms sql/ssas as data source. We are in phase of creating a new reporting module. so for consistency of graphs and ui we want to use flex as front end and SSAS as backend for reporting module. My understanding is: *Flex based UI (reports/parameters) SSRS Reports (standa...

Best mock framework for .Net 2.0?

Most of the sexy new .Net mock frameworks have heavy dependencies on 3.5 language features such as lambdas and extension methods. I'm looking for recommendations for the "best" mocking tool for a legacy-ish project developed in .Net 2.0. The criteria for "best" would be ease-of-use and readability first, followed by power and scope of f...

Can I set a property for an array?

currently I have a variable and a property: private System.Xml.Linq.XDocument myDoc; public System.Xml.Linq.XDocument getMyDoc { get { return myDoc; } set { myDoc = value; } } now I need two docs: private System.Xm...

C# Generics Constraints: Is there a way to express is not a?

I have the following code: interface IConverter<T, U> { U Convert(T obj); } interface IBusinessEntityConveter<T, U> : IConverter<T, U> where U : BusinessEntity { } class LookupConveter<B> : IBusinessEntityConveter<Lookup, B>, IConverter<Lookup, Moniker> where B : BusinessEntity, new() { #region IConverter<Lookup, Moni...

How project Lombok in java works and is that possible in .net using attributes?

Project Lombok makes it trivial to implement the boilerplate code in the classes. Is that possible with .net attributes. Is any .net port there? ...

how to set path in MSI installer?

I am using VS2008 setup project to build our msi installer. I have moved some dll files from the default location (root folder of the installation) to a custom bin directory. I think I need to set path in somewhere (registry?) to tell the application the new loation of those dll files. How to do this? thanks, ...

Microsoft Chart - Using FastLine instead of StepLine for high performance ?

Hi, I'm using Microsoft Chart in order to draw some stepline charts. Should I use StepLine directly or should i make my own using FastLine in order to be faster ? In other words, do anyone know if the stepline is built on the Line or on the FastLine type. I've got around several thousands points to draw. StepLine : http://msdn.micro...

where are C# ADO.NET DbConnection.GetSchema "attributes" defined?

I find this whole GetSchema thing awfully complex. Is there any decent documentation for all this at all? One would expect that normal use is to get data for table: indexes and columns(name, type, allownulls) and then have method(s) to ask these properties. One might also expect that these properties would be enum or even a webpage that ...

Encoding conversion from RSS feed chars.

Hello, I am trying to show a simple text RSS feed from a CodePlex project in a window. My problem is that the feed text contains a lot of character sequences that looks like: &#58; &#45; etc.. I know that they represent the punctuation and some special chars, with some kind of encoding, but I do not know how I can convert them back ...

Entity Framework 4.0 - Versioning

Is this possible to implement with EF4.0? I have used NHibernate in the past and you can flag a timestamp column as a 'Version' column and it will enforce concurrency. Does this feature exist for EF4.0? If it does, are there any resources on how to set this up? If it does not exist, what alternatives do I have to handle 2 users editing ...

System.Configuration: Question on the Configuration.Save method

What is the difference between configuration.Save(ConfigurationSaveMode.Modified, true) and configuration.Save()? Background: I have a programme, where I manipulate a web.config, which I use for configuring WCF Services. I load it into a Configuration object, change some attributes and save it back. When I use configuration.Save(Configu...

WiX exception at very beginning

I downloaded Wix V3.0 and installed. An unhandled exception happened each time when I tried to use the Click Through for Isolated Applications type. So i cannot use it. we are using .Net 3.5 we cannot upgrade to .Net 4. anybody knows a workaround? thanks, ...

.NET COMException Interface non registered

I can't understand this. I want to use an OCX from this vendor http://www.mobyt.it/ to send SMSs. It is a dll and they provide usage examples in Vb, .NET, Visual C, etc. The exception I get is: System.Runtime.InteropServices.COMException (0x80040154): Interface not registered. (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))...

help fixing up a regex - \r\n isn't being detected

Folks, I have method that returns true if all characters are "legal" and false if a single character is "illegal". The definition is below (legal = letters, numbers, and some characters like $, - , %, etc). I want a newline and/or carriage return character to be "illegal". However, the method below thinks that its legal. How can I f...

Question on streams and http request/response

When using streams, memory consumption is supposed to be the same as the size of the buffer. However, I am not sure how a stream works when I look at the following code, which uses http request and response. (HttpWebRequest to be precise) Stream requestStream = webRequest.GetRequestStream(); // Here write stuff to the stream, data is a...