.net

Connecting Delphi to P/Invoke and .net

The Delphi complier often uses a *.Dll when a special delivery of code info is required to the complier/editor:- example bourland.dll is the memory manager for the Delphi complier, as I remember. And their are many other *.dll's that Embarcoo keep secret that do other things. Is their anything you know that is public information on this ...

Sharepoint 2010 - how do I modify a taxonomic property?

I want to modify a taxonomic user profile property in Sharepoint 2010. Just as an example, let's say I wanted to modify the Interests property (aka SPS-Interests, or PropertyConstants.Interests). I tried setting the property value with the semicolon-delimited string, like this: var property = profile[PropertyConstants.Interests]; if (pr...

Regex headache...

I want to validate a some C# source code for a scripting engine. I want to make sure that only System.Math class members may be referenced. I am trying to create a regular expression that will match a dot, followed by a capital letter, followed by any number of word characters, ending at a word boundry that is NOT preceded by System.Ma...

XSLT Layouts With Dynamic Content Region

I'm working on rebuilding the UI portion of our website which is all heavily javascript/ajax based (for no good reason and in a fairly inefficient way) such that the backend will now do most of the content generation. It is a C# .net application. Almost all of our pages (which there are probably 40-50 pages) have the same basic layout. ...

How to recreate faulted WCF proxies stored within a presenter/controller?

Question regarding patterns involving Model-View-Presenter, IOC and WCF (although I imagine the same would apply to MVC): Working on a large-scale Windows Forms implementation using a MVP (Supervising Controller) pattern plus IOC, where Presenters get their dependencies injected. One common type of dependency is a WCF Client Proxy, crea...

How to deploy new version of .NET component to allow easy rollback to prior version

What is the best way to deploy a new version of a .NET component and to allow easy rollback to a prior version? The .NET DLL is being used by a VB6 app. What would be the best way to quickly revert to the prior version of the DLL if a problem occurred with the new DLL? ...

convert datetime js to c#

How would I convert this from js to C#. I've looked but cant find anything useful. var endDate = new DateTime(); endDate.setDate(startDateTime.getDate() + days); endDate.setHours(endDateTime.getHours(), endDateTime.getMinutes(), endDateTime.getSeconds()); ...

What is the best open source for .NET controls?

Does anyone know the best opensource for .NET controls? With Dev Express, Telerik, they so cool, but they are commercial version. ...

How to load a referenced dll from specified location not GAC?

I have a dll named A.dll with strong name, another assembly B references A.dll. I place A.dll in c:\myapp, also A.dll is installed in GAC. I hope assembly B loads the A.dll from c:\myapp not GAC. But it always load the A.dll from GAC. My question is how to load a referenced dll from specified local location not GAC. Thanks. ...

Swapping Nodes on a single linked list

Since long back I have not used C or C++ ,so forget completely about Pointers. I'm familiar with C# and have written a basic version of this. Need to know whether I'm doing right/wrong? Input:Linked List a->b->c->d->e->null Output: Linked List b->a->d->c->e->null We have to write code such that memory position is swapped and not the n...

XPath problem, getting "expression must evaluate to a node-set." error..

I'm having trouble retrieving a single node by its explicit XPath that I have already found by other ways. I have node and I can get its XPath, but when I try to retrieve that same node again this time via node.XPath it gives the "expression must evaluate to a node-set" error. Shouldn't this work? I'm using HtmlAgilityPack in C# btw f...

PROBLEM EXECUTING a query in vb

I have a problem with a sql query. Through the query I am trying to search database for any occurrences of string (can be anything) in a column using the SQL LIKE command. The problem is that it works fine for most of the strings say john, jim, ji"m , but does not work when i include the following characters which are ( ' , { , } , and a...

Set individual pixels in .NET Format16bppGrayScale image

I'm trying to render a small Bitmap in memory with .NET that needs to be 16 bit Grayscale. The bitmap's format is set to PixelFormat.Format16bppGrayScale. However, Bitmap.SetPixel takes a Color argument. Color in turn takes one byte for each of R, B, and G (and optionally A). How do I specify a 16-bit gray scale value rather than an ...

How can I check if there is a default printer (Windows)?

Is there a API or registry key which I can use from applications (native, Java or .Net) to check if the currently logged on user has configured a default printer? Update: Many thanks for the answers so far! According to the KB article http://support.microsoft.com/kb/156212, the registry entry (read/write) is only documented up to Window...

Comparison of substring operation performance between .NET and Java

Taking substrings of a string is a very common string manipulation operation, but I heard that there might be considerable differences in performance/implementation between the Java and .NET platform. Specifically I heard that in Java, java.lang.String offers constant time operation for substring, but in .NET, System.String offers linear...

Is there any Java API sepc-like documentation for C#?

I hope this is not a duplicate post, which I seriously doubt, but I don't seem to be able to find a similar post. After a few months into programming with .NET/C#, it still bothers me that I can't find a C# documentation source that is as easily accessible as Java API spec or Objective-C. I am pretty sure MSDN has got something like tha...

Would you say .Net remoting relies on tight coupling?

Given that both the client and the server need to know everything about the object being remoted, firstly is this tight coupling, and secondly can .Net Remoting work in any other way? ...

Has there been any improvement in .Net TCP/IP library ?

Sometimes back I had to work on plain TCP/IP client-server application using just .Net framework 2.0. I found that .net 2.0 socket library was quite inefficient and used to take lot of memory and processing cycles we then switched over to C++ and it worked very well. I want to check if there's been any improvements for TCP/IP library i...

how can i use a javascript in gridview row

hi there, I want to use a flash chart in a gridview. you can see my codes in below: DataTable tbl = new DataTable(); tbl.Columns.Add("chart"); DataRow rw; rw = tbl.NewRow(); rw["chart"] = @"<div id=""chart5Div""></div> <script type=""text/javascript""> var ch...

Is it possible to programmatically check when a .NET control will set off UAC?

I'm trying to use reflection to have a program look at itself and determine whether a certain control triggers UAC. I'd either like to be able to see that the event handler on the button creates a privileged process or to check whether a given button has the UAC shield enabled on it. Is this possible? ...