.net

Why is Process.PagedMemorySize64 > 0 when there is no paging memory on the machine?

I am runing .net code on a machine with the page file size set to zero. My application logs System.Diagnostics.Process.PagedMemorySize64 and is showing a value > 0. How can this be? The documentation for PagedMemorySize64 reads: The value returned by this property represents the current size of memory in the virtual memory pagin...

Edit strings of variable length

How can I take only the number from strings in this format: "####-somestring" "###-someotherstring" "######-anotherstring" ...

Why is my generic list populated in XAML empty at runtime?

All, I've got a generic list defined in a custom user control. private List<string> m_AnimationNames = new List<string>(); public List<string> AnimationNames { get { return this.m_AnimationNames; } set { this.m_AnimationNames = value; } } I reference this list in xaml, and populate it, like so...

Why can I not directly refer to a namespace that I can import?

I have a bizarre vb.net problem. I'm working with a 3rd party library with a namespace called Telerik.Webcontrols. The library is in a web site project that I am in the process of converting to a web application project. Telerik.WebControls contains a class called RadAjaxControl. In the original web site project, I have code that loo...

Loading a generic type by name when the generics arguments come from multiple assemblies

I need to create a type from its full name only Ex: "System.String" or "Tuple'2[string,Mytype]". there is no information about the assembly in the string. Here is what the code look like. private static Type LoadType(string typeName) { // try loading the type Type type = Type.GetType(typeName, false); if (type != null) ...

Receiving Emails on Hosting Domain Email Id from any user visiting to site.

I am trying to create a contact us page where visitor of the site can leave a message to site-admin. say I m running this site www.example.com and i have an id [email protected] Now a new visitor visits my site and fills up the contact us form. He fills FROM - [email protected] Subject- Query Message- My question.... I want to send t...

Using LINQ with IBM i

Has anyone been able to use LINQ with the IBM i? That is without having to write a custom provider? ...

Getting XY location of text within TextBox/RichTextBox

How to get coordinates of certain character within TextBox and/or RichTextBox? I will try to explain this through function: Point GetXY(int characterIndex) { //do some magic return new Point(x, y); } Idea is to find where selected text is located so Find dialog will not be displayed over this location but moved to side (like ...

Data Access Application Framework for .NET + SQL Server?

We are looking to create an in-house Project Dashboard application. Project Managers will use this to create and update projects, submit project status, enter project metrics, etc. A separate reporting piece would read the data entered by the tool and bubble up reporting data. If this were 1990 and the app was to run in DOS I would ch...

Is there .Net TypeConverter equivalent in Java

In .NET when I had a "value" that could exist as multiple types I could easily use a TypeConverter for switching between those types (currency types, xml data vs object representation, ect). In Java, I am not sure what the preferred way to handle this situation is. Is there a TypeConverter equivalent in Java? ...

How to avoid starving the main thread?

I'm doing a patch to solve a progress bar issue in an application that is a bit mess-up. The cancel on the progress bar used to do a Thread.Abort on the thread doing the heavy work. I changed that to raising a cancel flag that I can check at strategic place in the thread. Most of the time it works fine but once in a while the cancellati...

vista/win7 magnification API in .NET

There is magnification.lib in win7/vista SDK for using magnification API for C++ (http://msdn.microsoft.com/en-us/library/ms692162%28VS.85%29.aspx). How can I use this API in .NET windows forms project? Thank you for any advice. ...

C# delegates, reference resolution time.

Hi, I have a simple question about .net delegates. Say I have something like this: public void Invoke(Action<T> action) { Invoke(() => action(this.Value)); } public void Invoke(Action action) { m_TaskQueue.Enqueue(action); } The first function encloses a reference to this.Value. During runtime,...

Can I post a content directly from a website to the website's facebook page?

I've been reading through the fb developer api documentation and I'm trying to find out what would be the easiest way to post information on a website to the website's own facebook page. for instance - the assumed workflow is like this: an admin user adds new content to the company website - and once submitted that content should autom...

upgrading .NET application from MapPoint 2004 to 2009...

I am in the process of upgrading a Visual Studio 2005 .NET (C#) application from it's integration with MapPoint 2004 to supporting MapPoint 2009. After a bit of searching and fiddling, I've generated new DLLs using "tldimp" and "aximp" and now have Interop.MapPoint.dll and AxInterop.MapPoint.dll and the namespaces seem to line up to the...

How can one scroll legitimately with GDI+?

Is there a preferred, fast method of scrolling within a user control in GDI+? I've created a control that graphically renders a horizontally scrollable data plot. Currently, my control operates by converting the position of a horizontal scroll bar into an offset into the data. The control then renders the data that exists between this...

Linq and DataSetExtensions warnings using .NET Framework 2.0 and C# 3

I am receiving the following warnings: Warning 1 Could not resolve assembly System.Xml.Linq. The target framework required by this assembly (3.5) is higher than the project target framework. If this reference is required by your code, you may get compilation errors. ConsoleApplication1 Warning 2 Could not...

Single sign on cookie removed by anti spyware software

We have a single sign on implementation for a family of websites where the authentication cookie comes from the root domain (e.g. bar.com), allowing them to be logged into a child domain (e.g. foo.bar.com). The implementation is in C# using standard .net forms authentication. Unfortunately, some of our users are having their authenticat...

C# Extension methods in .NET 2.0

I have found several links to methods of making extension methods work in .NET2.0 (The moth, Discord & Rhyme, Stack Overflow). I have also heard vaguely from a colleague that this causes some problems with libraries or something? Is this the case? Also all 3 use different methods: The moth: namespace System.Runtime.CompilerServices { ...

Do an HTTP Post in .NET (Vb) with compressed data using deflatestream

The data that I am posting from a VB.Net client is large and I want to compress. I want to do a "POST" and the apache server supports mod_deflate. I am trying to integrate DeflateStream into my post code, however does not seem to be working. I can send the data without compression using the standard code. request.ContentType = "a...