My application traverses a directory tree and in each directory it tries to open a file with a particular name (using File.OpenRead()). If this call throws FileNotFoundException then it knows that the file does not exist. Would I rather have a File.Exists() call before that to check if file exists? Would this be more efficient?
...
I have an application that loads two assembly dlls. First dll is a common dll and the second dll has reference to another version of the first dll. All assemblies are unsigned.
App.exe --> dll1_v1.dll, dll2.dll
dll2.dll --> dll1_v2.dll
Both dll1_v1.dll and dll1_v2.dll have same types but different implementations.
If I have both dll1...
I have a number of web application projects in a .net environment that use web services created by my DBA to select, update, and delete data from my SQL database.
My DBA suggests that he will continue to create new web service interfaces for new projects in the future. I understand that this process is somewhat inefficient in terms of ...
What features do you want to see in System.Net.HttpWebRequest and System.Net.WebClient that are not included out of the box?
What cannot or cannot be easily achieved with those classes?
I'd like to be able to:
Use bandwidth throttling when downloading (useful for large files).
Upload multiple files and key-value pairs via HTTP post ...
Is there any way to obtain the AssemblyVersion of a .Net executable in Linux without using mono? What I am trying to have is a script or command that will let me obtain the AssemblyVersion on Linux boxes. I tried: #strings file.exe | grep AssemblyVersion but it only the string and not the number. Also checked with:#file file.exe but o...
I have successfully done this using "MSGraph.Chart.8" in VS 2010 and c# and the graphs look ancient and pixelated like back in 1995 or so. The help online seems all the same. like this one... http://support.microsoft.com/kb/316384
I really need to generate these word documents with nicer graphs in code, or at least edit an existin...
In one C# project have a base class like this:
public abstract class AbstractVersionedBase
{
public string Version { get {
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}}
}
This project has a version of 0.0.1.1.
In another C# project I have a class that inherits from AbstractVersionedBase lik...
I'm sending an HTTP PUT request from a WinForms application and I'd like to send a slow trickle of PUT data to the page that will write messages into a database as the PUT data arrives. I'm using WebRequest and I've set SendChunked to true, but it only seems to send a chunk after 8KB of data have been written to the request stream.
Even...
I implemented the following Silverlight app after seeing this instructions, here's my code:
public partial class MainPage : UserControl
{
private Point lastMousePos = new Point();
private double zoom = 1;
private Point lastMouseLogicaPos = new Point();
private Point lastMouseViewPort = new Point();
private bool durin...
I am given a string that has place holders in the format of {{some_text}}. I would like to extract this into a collection using C# and believe RegEx is the best way to do this. RegEx is a little over my head but it seems powerful enough to work in this case. Here is my example:
<a title="{{element='title'}}" href="{{url}}">
<img border=...
What size should the Application Icon be for .NET programs?
...
I want to do something like
IsItAStringLiteral("yes")
var v = "no";
IsItAStringLiteral(v)
With the obvious return value. Is it possible?
...
Does anyone know where to start, or even if you can write add-ons for managing extras like audio books or your own collection management routines / visualizations?
...
I'm creating an application and I've been under the assumption
that when a control is bound to a member in the view-model
(i.e. a TextBox to a string field) the string is updated whenever
the user changes the information in the textbox and no later.
But what I've found is that the string is updated when the textbox
is changed AND when t...
Hey,
I have a model-view-controller based web application. When the application starts up, I first call a clearup stored procedure. This basically removes any rows from the database which are now irrelevant. For example if the company had deleted a category but I had missed out the line to delete all products within this category, this ...
I'm using some code from a book to implement a generic repository class for EF data access. the code uses the following two methods to get a single entity by its int id primary key, assuming all DB objects have an int PK. However, I am using an imported DB with mainly natural keys, and I wish to preserve all the FK relationships as the...
Hi guys,
Currently I am struggling with a very annoying problem, namely when I deploy my .net 2.0 application on Windows XP (without any SP) I am receiving a CreateProcess error with error code 14001. When I looked in the event log, I noticed there is a problem with the syntax of manifest or policy file.
I tried to find such file in th...
I have an loaded some XML in an XMLDocument object. I am iterating through the document by using an
For Each node As XmlNode In doc.GetElementsByTagName("Item", [NAMESPACE])
'Do Stuff
Next
I would like to use xpath within this loop to pull out all nodes with the name of "MyNode"
I would have thought i would simply have to do node....
This semester I'm working on an application that is joining two projects in two different courses in my Software Engineering degree:
SWE 490: Component Based Software Engineering
SWE 344: IP and Client Server programing
Here's what's my application about :
Client Side (Desktop Based): Main function is to capture the webcam video and s...
I developed a webservice in .net and I'm trying to call it in Android.
To call the webservice I'm using ksoap2.
The WDSL's URL is: http://localhost/Cidadaos_Cidade/Open.asmx?WSDL
Here's the WSDL
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/...