i am using the following code to read the details from a network folder which is restricted for only one user
shell("net use q: \\serveryname\foldername /user:admin pwrd", AppWinStyle.Hide, True, 10000)
Process.Start(path)
shell("net use q: /delete")
when i run this to open any pdf or jpg or any other files except word/exc...
I was watching a Silverlight tutorial video, and I came across an unfamiliar expression
in the example code.
what is => ?
what is its name? could you please provide me a link?
I couldn't search for it because they are special characters.
code:
var ctx = new EventManagerDomainContext();
ctx.Events.Add(newEvent);
...
Hi,
is there any option when updating classes in EF4 Modeller to disable the drop
of all data and tables, just to append non existing fields and leave old tables and data
untouched.
I mean not to change every time on every little change to edit manual the SQL files.
Thanks.
...
I'm trying to get a firebird web application (IIS6 64 bit) to run. However I'm getting bad image format (bit difference incompatability) issues. Has anyone got any advice to get it running.
Details AnyCPU application references the .net firebird driver (through nhibernate) which uses a native 64bit dll. There is a native 32bit dll which...
I have a Contextmenu with a ListBox inside. Whenever I right click my control and select a value from my contextmenu the last selected value stays marked and I can't select that value again.
The idea is, that I may select the same value within the COntextmenu in order to turn a property on or off.
Should be quite basic, what am I miss...
I have a process running with elevated permissions (defined through manifest file /asAdministrator) and would like to launch an out-of-process Visual Studio instance with elevated permissions too. Currently VS is launched for OLE Automation purposes with the code below:
Type type = System.Type.GetTypeFromProgID(dteVersion);
DTE dte = (D...
Hello
I have used some third party controls in my windows application.
There is a snippet which is being used in our code which re-initializes all the .text property of all the controls on the form.
Everything works fine except for a control.
This control is similar to the Windows Panel except for it has a dropdown appearance.
This...
Yesterday, I decided to install the newest NCover version (3.4.2). However, when I ran it on my existing .ncover configuration file, the NCover output suddenly reported that all my MSTest tests failed. Of course those tests succeed when ran within Visual Studio. Because of this, NCover isn't able to determine any coverage.
Somehow the o...
I would like to write all data relations processes (general functions regarding with DataAccess via .NET) in dll and I want to use it repeatedly. What kinds of functions should have in that dll? Some want to use Stored Procedures , Some with Statements. Can you all suggest me? Please guide me! Thanks all!
...
If I use this class to do a
SELECT * FROM ...
statement against a database, what method or variable of this class should I use just to give me a dump of the output from the SQL statement?
...
We're building a C# app that uses an external DLL for Sqlite.NET. This is a .NET dll but it embeds a C dll inside it and so it comes in x86 and x64 flavours.
We add a reference to the x86 version in the project so when we build and run on x86 it's fine. Visual studio copies the dll to the bin folder and runs.
On x64 it still copies t...
We're about to embark on a fairly large integration effort to kill off a bunch of Access and Sql Server databases and get everything into one coherent enterprise system. There are also a number of other systems (accounting, CRM, payroll, MS Exchange) that hold critical data that we need to integrate (use for data validation in other syst...
How to know and then print out (in debug) the stack level reached in a certain moment inside a function call?
...
Hi I have an application that works fine in my dev enviroment, but throws weird errors in the production enviroment, I checked the version of .net on my dev machine aswell as the production server , they both run 3.5.30729.01.
The exception I get is a System.IO.FileNotFoundException.
StackTrace:
at System.Diagnostics.FileVersionIn...
HashSet<T> t = new HashSet<T>();
// add 10 million items
Dictionary<T, K> t = new Dictionary<T, K>();
// add 10 million items.
Whose .Contains method will return quicker?
Just to clarify, my requirement is I have 10 million objects (well, strings really) that I need to check if they exist in the Data Structure. I will NEVER iterate....
I ran into a rather odd behavior that I don't even know how to start describing.
I wrote a piece of managed C++ code that makes calls to native methods.
A (very) simplified version of the code would look like this (I know it looks like a full native function, just assume there is managed stuff being done all over the place):
int somefu...
I have to get the absolute path of a windows service in a .Net Admin application. I am using ServiceController of .Net as shown below.
ServiceController serviceController = new ServiceController(serviceName);
But I don't see any property here to get the absolute path of the .exe of the service. Is there anyway to get this programmati...
Hi,
I want to convert jpg file to svg file in c# .net.
...
What would be the point of just having:
catch (Exception)
{
throw;
}
What does this do?
...
I have come across a class which is non-static, but all the methods and variables are static. Eg:
public class Class1 {
private static string String1 = "one";
private static string String2 = "two";
public static void PrintStrings(string str1, string str2)
{
...
All the variables are static across all instances...