By "guaranteed to succeed" I mean: If no Exception is thrown on the call to CopyTo, can I safely assume that the file was copied perfectly, or would it be reasonable to validate the copy (such as with a checksum)? This of course assumes that the integrity of the file is mission-critical.
...
Hi,
In C#/.NET, is there any way to get a notification before the object pointed to by a weak reference is destructed? Basically, I want to allow an object to be collected, but do something right before the object is destroyed, without modifying code to add destructors (since I won't know exactly what types of objects will be sued with ...
I am working with a legacy system that stores its data in individual files (1 for each table). I can open the files with MS Excel and manipulate them, so I am hoping I can manipulate the files using .Net. I am more familiar with connecting to MS SQL Server than anything else.
I have tried a bunch of different connection strings but I ...
I'm planing a larger project,so i'm considering some technology options.
The project will use the 3 tier architecture design. The presentation layer will be ASP.NET but it could be some other technology. This doesn't matter for now.
My questions are:
For the aplication server should i use a windows service or just a normal applicati...
How do I have LINQ to XML iqnore all namespaces? Or alteranately, how to I strip out the namespaces?
I'm asking because the namespaces are being set in a semi-random fashion and I'm tired of having to search for nodes both with and without a namespace.
...
Hi!
I've implemented a solution that uses asynchronous sockets to push information from a server to all connected Silverlight clients.
I'm having a few problems with the Push Server and need some clarification since this is the first time I'm working with Sockets and in an fully asynchronous environment.
Right now the Push Server acc...
Hi,
In maintaining an ASP.Net application, I've come across an unusual problem with the Back Button in IE7. After selecting a few links to the aspx pages and then pressing the Back Button once, IE's Back Button greys out and the drop-down Quick History contains no more entries. This is obviously incorrect since multiple links were click...
Hey Guys,
I have a function that returns a 2 dimensional array. Due to the nature of the program I MUST declare it as an object.
Like this
object o1 = function(x); //note the function returns something similar to this {string[x,y]};
ultimately I want to bind this data to a GridView.
If the array is one dimensional...the followi...
Are there any object databases for .NET or with bindings for .NET?
...
The BackgroundWorker object allows us to pass a single argument into the DoWorkEventHandler.
// setup/init:
BackgroundWorker endCallWorker = new BackgroundWorker();
endCallWorker.DoWork += new DoWorkEventHandler(EndCallWorker_DoWork);
...
endCallWorker.RunWorkerAsync(userName);
// the handler:
private void EndCallWorker_DoWork(object ...
Hi,
I'm building a GridView control which encapsulates a child gridview. The child gridview holds a div tag which is displayed when the user selects a row in the parent gridview. However, even though the contents is hidden i.e. the div tag, an extra column is added - how do I get rid of the extra column. In the tutorial it states tha...
From Wikipedia:Vector Formats, there are several vector graphic format, such as:
CGM (Computer Graphics Metafile)
SVG (Scalable Vector Graphics)
ODG (OpenDocument Graphics)
EPS (Encapsulated PostScript)
PDF (Portable Document Format)
SWF (Small Web Format)
WMF / EMF (Windows Metafile / Enhanced Metafile)
XPS (XML Paper Specification)
...
I know very little about C# or .net but I am interested in learning about them.
One thing that intrigues me is that I keep hearing that "C# 3 is really great".
Why is that? What is the difference from C# 2. Are the differences just in C# or in .net also?
Thanks in advance.
...
Windows 7 has an AWESOME new feature that applications can report the progress of the current activity through the status bar. For example, when copying file(s) using Windows Explorer, a progress bar is layered on top of the application icon in the task bar and the progress is shown as it updates.
What is the API for exposing the progr...
Does anyone know of some good articles / tutorials on writing addins/plugins for Visual Studio 2010?
...
Hi,
This seems like a weird position to be in, but let me ask the question anyway.
I have created some DLLs that do some magical mumbo-jumbo that is needed to display the content for the website I am making right now in ASP.Net. I've got a small team of developers who can help me with this, but I am afraid that they will steal my code (...
There is a .NET opensource library called NPOI that allows you to manipulate Excel files. Unfortunately, their ShiftRows function does not adjust any cell references in formulas.
Therefore, I need to create a regex pattern to update them. Take for example a cell containing the following formula:
=(B7/C9) * (A10-B4)
I would like to b...
I'd like to be able to store a function in a hashtable. I can create a map like:
hash = {}
hash["one"] = def():
print "one got called"
But I'm not able to call it:
func = hash["one"]
func()
This produces the following error message: It is not possible to invoke an expression on type 'object'. Neither Invoke or Call works.
How c...
I want to create a simple application using the classes in System.Reflection.Emit. How can I add the enrypoint directive to the Main method?
AssemblyName aName = new AssemblyName("Hello");
AssemblyBuilder aBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Save);
ModuleBuilder mBuilder = aBuilder.Defin...
Hello everyone,
I am using VSTS 2008 + C# + .Net 2.0 to develop a Windows Forms application. In the default Form1 I have a button, and click the button will invoke another Form -- Form2.
My question is, I want to make Form2 always on the top, i.e. user must response Form2 (fill in informaiton in Form2 and close it) until the user could...