I am doing some diagnostic logging with one of my C#.NET projects and I would like to be able to log an identifier that represents a specific instance of a class. I know I could do this with a static variable that just gets incremented every time a class instance is created but I am just wondering if there is any built-in way in the .NET...
I want to obfuscate one query string parameter in ASP.NET. The site will have a high volume of request, so the algorithm shouldn't be too slow.
My problem is that all the algorithms I found result in unwanted characters (like +/=)
Here is an example of what i want to achieve:
www.domain.com/?id=1844
to
www.domain.com/?id=3GQ5DTL3...
I have a C# Winforms app that uses the HelpProvider class.
Whenever i press F1 to bring up help, the help window will always be on top of my application, I cannot bring my application UI to the foreground. I can still interact with my UI, but the help window will remain on top.
Is this by design of HelpProvider? Or am I missing somethin...
I setup WCF service tracing because 1 client out of about 30 wasn't able to finish the connection to the server. After setting up test case on that client, the WCF trace report gave me these exceptions:
An operation was attempted on a nonexistent network connection
and then
The I/O operation has been aborted because of either ...
How do I override the ShortTimePattern and LongTimePattern to always be in 12 hour time?
The following code works well only with en-US, because other cultures have different patterns.
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongTimePattern = "h:mm:ss tt"
System.Threading.Thread.CurrentThread.CurrentC...
My ASP.NET application imports CSV files. They are mostly saved in spreadsheet or notepad that asks for 'character set', for example: ISO-8859-2, Windows-1210, DOS-852 or Unicode(UTF-8).
Wiki says UTF-8 is a character encoding but Windows-1210 and ISO-8859-2 are code pages. Are these terms interchangeable?
.NET reads files saved in UT...
A simple linq to SQL query Might return a product object. Obiously I could pass this object to my business layer, then read and update the data, directly against that object.
I've seen a bunch of implementations where following the execution of the linq query the resulting object is mapped (via automapper or manually) to a custom busin...
Hi
first of all, I am new to silverlight(play around with it for one month) and this is my first job. However, i am willing to learn anything which can let me advance my silverlight knowledge.
Currently, I need to implement a big Silverlight project about Financial(kind of similar to Microsoft Accounting). It will have a lot of tables ...
I have an XML element that looks something like this:
<content locale="en"> </content>
The text between the bracketed stuff consists of a single space character. When I load the XML into an XmlDocument look at the XmlElement object for the above element, I expect:
contentElement.InnerText.Length == 1; // InnerText should be a single ...
In all samples it uses the Web References to generate the proxies.
But my service is a WCF service. Should I be using the NetCFSvcUtil to generate my proxy ? or shouldI just simply use the Web References one.
I tried using the ones generated by NetCFSvcUtil, but I'm just stubbling on different issues.
First, the FaultException for ...
I understand that a class which inherits from another class may hide a property by using the new keyword. This, however, is hiding a specific implementation of the property, so I can see how it could be used.
Is there any practical reason to hide members in interfaces which implement other interfaces? For example consider the example be...
Hey,
There are several questions like this, but my situation seems a bit different. I have extremely simple code:
WebClient client = new WebClient();
client.DownloadFile("http://www.xkcd.com", "xkcd.html");
However, I get the error "No connection could be made because target machine actively refused the connection." However, I also ...
I am running to a problem where I have to plot one scatter (data points), the other one the best line fit(trend line) for those data points in one chart. The X axis is datetime format which I, myself, am chaning it into a double value with a base date. The plots get plotted well individually. However, I dont get good results when I combi...
So i have this new Axis2 MTOM Webservice serving correctly to a java based webservice client.
The problem comes around when i try to add the service (or web) reference to the vs2008 and consume it with the generated code. Until now, is everything OK... this is what happens:
We create the necessary objects
(client, request and paramete...
Hi
I want to call only stored procedures on database and fill my C# object according to the result. I just need a mapping file, and a fast reflection tool like Fasterflect found on CodePlex to create my own ORM.
Is there any ORM available with these feature for C# which has lightning fast performance ?
or what should I do to complete t...
We are automating application UI with MS "AutomationElement Class". In same application few activex controls are also available and we are currently unable to automate the controls which are available in Activex. Can you please let me know whether there is any way to automate activex controls.
...
I recently moved to a new development box from Windows XP 32 Bit to Windows 7 64 bit. Both machines are running .Net Framework version 4.0 for development with Visual Studio 2010.
After upgrading to Windows 7 64 Bit, my code to split a multi-page Tiff image into separate images is now broken (worked fine previously on XP 32 Bit, except ...
is there a way to treat a section of your regex string 'as is'?
I.e. I want to match for the literal pattern: "[^*..@/w$[{" in some text (exaggerated example, but you see what I mean)... Can I just enclose the whole bit in something?
...
What is difference when .NET assemblies are stored at shared location and GAC?
...
Is there an equivalent in Delphi? I've looked over the documentation and can't find anything that would give me the output I want.
...