-
- dayOfWeek and hour of SysTime sample
by AlexBB
- 6 Replies
- Last post
by AlexBB
- I need to keep pulse of system DateTme and I copied code from ms-help://MS.VSCC.v80/MS.MSDN.vAug06.en/dv_fxinterop/html/3724d25e-3de5-493b-9566-68071b83e159.htm and tested it. It gave me two incorrect values.
The real DateTime was (EST) 1/6/2007 10 :41:15 AM dayOfWeek = 7 (Saturday).
I got 1/6/2007 15 :41:15 dayOfWeek = 6
Next I checked DOW(DATE()) in VFP and surely the result was 7 (Satu
-
- Get current user domain/login
by Vladimir Kovalenko
- 9 Replies
- Last post
by OmegaMan
- Hello, In my setup project there is a custom action. Due to security issues in Windows Vista I had to set no impersonation bit for the custom action. On the other hand I need to get real user login (domain/login). WindowsIdentity.GetCurrent().Name returns NT AUTHORIT/SYSTEM. How can I overcome this behavior
-
- C#, interface property public vs private implementation:
by recherche
- 7 Replies
- Last post
by recherche
- Hi!
Please explain the *difference when the following interface property implementation (Code snippet 1) is implemented private and explicit (Code snippet 2):
Code snippet 1:
// Property in interface, implemented by struct
using System;
interface MyInterface { int property { get; set; } }
struct MyStruct : MyInterface { public int n;
public int
-
- A naive question: How to install and uninstall a unmanaged windows service?
by plshn99
- 4 Replies
- Last post
by plshn99
- Hi there,
I know to use "installUtil" for the managed services.
But can anyone tell me how to install and uninstall the unmanaged windows service
thanks,
Kai
-
- How can I retrive MachineName ?
by omid talebi
- 5 Replies
- Last post
by vinoth kumar.R
- How can I retrive MachineName
-
- C# Language: File structure
by &#208&
- 10 Replies
- Last post
by Peter Ritchie
- A simple question really: Why didn't MSFT inherit the C++ file structure with C# (IE: Header files and Source files). I think that it would make C# quite more powerful, and more managable at the same time. Good practice is to split your modules every several hundred lines of code to make things more managable, and easier to track bugs down. I know C# has partial classes, but its just not the same
-
- Problems with types (object vs structure)
by Chryso
- 4 Replies
- Last post
by Chryso
- Hello, As I understand it, one of the main differences between object and structures are they way they are passed as parameters to methods / functions. Objects use references, structure uses copies. But what about lists of structures or objects Are list of structures considered as an object and so the list is passed as a reference or is it passed as a copy What about lists of objects. I am wonderi
-
- ArrayList.IndexOf
by Azurewrath
- 14 Replies
- Last post
by Azurewrath
- Hi all, I am trying this method, but with an arraylist that contains Vector3 data types, I don't know how to find a particular one. I tried: Console.WriteLine ( "IndexOf Vector3: {0}", a.IndexOf ( new Vector3 ( 0, 0, 1 ) ) ); But this returns -1, even though there is a Vector3 ( 0, 0, 1 ) in the arraylist. Any idea on how to solve this Thanks, Aw
-
- The best O/R mapping tool for .Net
by Miguel Domingos
- 3 Replies
- Last post
by Sean Fowler
- I'm trying to find out the best O/R mapping tool for .NET. A perfect tool would begin with the database model and would be capable of generating 2 layers: the Domain layer (normal classes) and the Persistence layer (methods for storing and retrieving the domain layer objects from the database.
This tool would also be capable of generating the corresponding Visual Studio solution and projec
-
- == Handle leak when using Thread.Start()? ==
by Jackie8640
- 4 Replies
- Last post
by Peter Ritchie
- Hi all,
Here is the code I am using for testing. It will start 100 threads, each thread will do nothing but sleep for one second.
And I am watching the Handle Count and Thread Count in PerfMon. There is a spike for both Handle Count and Thread Count. After that spike, Thread Count will return to the original value (5 or 6 threads), in which case I am assuming there is no thread leak.
-
- How to get actual filename and line number in C# release version app?
by LittleRock
- 4 Replies
- Last post
by LittleRock
- Hi,
Does anyone know how to get actual filename and line number in a C# release build at run time
Is there anything in the C# precompiler like __FILE__and __LINE__ like in ANSI C
Thanks!
-
- Array.Reverse
by Waheedi
- 4 Replies
- Last post
by TilakGopi
- string [] parts = this .textBox1.Text.Split( new char [] { ' ' });
for ( int i = 0; i < parts.Length; ++i)
{
char [] characters = parts .ToCharArray();
Array .Reverse(characters);
parts = new string (characters);
}
string result = String .Join( " " ,parts );
this .textBox2.Text = result;
i want to modify this code to do this
:
-
- Import Excel Spreadsheet Data into SQL Server Database Table
by Donaghy
- 7 Replies
- Last post
by Ashish Basran
- Hi All,
I am trying to import data from an Excel spreadsheet into a SQL server db table though having some issues. This is the code I'm using:
private void Button1_Click( object sender, System.EventArgs e) { // Connection String to Excel Workbook string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Book1.xls;Extended Properties=""Excel 8.0;HDR=
-
- Process.waitforexit() not exiting
by Anthony Maimone
- 14 Replies
- Last post
by eradicator
- This question may seem a little odd but I am attempting to run VS2005 through a process and execute a specific command and I waitforexit(). I am redirecting my input and output successfully but every now and then I happen to receive a Window Error Reporting Window/Message. The problem is that I am remoting, so when this message/window occurs during the process execution, I will hang unless I log i
-
- Exit Application and application stops and does not dispose
by nguyenxh
- 5 Replies
- Last post
by Peter Ritchie
- Hello everyone,
I got a problem in C#: in my application there are 2 serial ports communication and when I click on a button to exit whole application, I expect that application would exit but my case is the application stops without disposing: this is my code for event of button:
Code Snippet
private void Button_Exit_Application_Click ( object sender , EventArgs
-
- Capturing image from wireless webcam
by markchimes2
- 4 Replies
- Last post
by IsshouFuuraibou
- I have a wireless webcam that I need to capture single fram images from and place into my C# app. My understanding is that WIA is not suitable for networked cameras. Can anyone provide advice on how to capture the image (I assume via TCP/IP some how) so I can display it in my pictureedit control
Thank you.
Mark Chimes
-
- How to assign a function to a variable?
by Azurewrath
- 5 Replies
- Last post
by Azurewrath
- Say I have a function like app.GetAllColorsOfTheHostApplication(),
How can I make it like this:
gac = app.GetAllColorsOfTheHostApplication,
to be able to use gac() instead
Thanks,
aw
-
- Why does List<T> not implement ISerializable/IDeserializationCallback??
by rdilipk
- 5 Replies
- Last post
by Michi Henning
- I was intrigued by a post over at microsoft.public.dotnet.framework. I MSN Live Search'ed for a long time but couldn't find any convincing explanation. I have reproduced the post here. I am also not sure if this post belongs here or in the BCL group. Anyway does anyone have any insights
=============================================================
Looking at List<T> and LinkedList&
-
- "Could not load file or assembly"
by thukralz
- 14 Replies
- Last post
by Harsimrat
- Hello Everyone,
I'm struggling with this problem for last few days and no solution. I have 3rd party assemblies which I use in my own project. Some of them work fine but some are giving problems.
I add them properly to my project using adding a reference and that shows in the list and gets copied properly as well but when the code runs it gives me exception
Could not load file or
-
- type load exception
by Haha1771
- 3 Replies
- Last post
by Figo Fei - MSFT
- if i get a type load exception what does it mean and what must i do
-
- Deleting all lines in .txt file
by meNu
- 7 Replies
- Last post
by meNu
- Does anyone know how to delete all the lines in a .txt file
-
- About Windows EventLog's Explanation
by tyousinkyuu
- 0 Replies
- Last post
by tyousinkyuu
- //****************************************************
For more information , see Help and Support Center at | http://go.microsoft.com/fwlink/events.asp .
//**************************************************************
The up information is always showed in the Explanation of windows eventlog.
Now I want to delete the Explanation when I write the enentlog. Below is my source.
//***
-
- The correct way to Windows service
by TMF
- 14 Replies
- Last post
by *Ram*
- Hi all,
This is some kind of philosophy question. What is the correct way to build windows service
And what exactly do I mean My WS (windows service) have timer and every 1 minute it execute method that need to do something. the method need to run on different thread, and it can be stopped during executing.
So, Whet is the correct way using timer thread timer timespan and wait and how ca
-
- Passing by reference to C++ dll problem
by GregStroud
- 9 Replies
- Last post
by GregStroud
- Hello
I've created a wrapper for a C++ dll I'm using in my C# application. I'm having a problem with one of the methods I'm calling. I'm passing in an a handle to the device, array of short, and a ulong. The size of the array is 2556, but when the method returns the array is a size of one
Here is the my wrapper I created to call the dll:
[ DllImport ( "EEGAMP.dll" )]
-
- Sorting Structure Array
by Sukh1983
- 10 Replies
- Last post
by Sukh1983
- Dear All,
I have a Console Application that records the top 10 records in a chart. At the moment the code uses a structure array, and uses the Get, Set methods to store values in the Array.
I now need to sort the Array, and came across the Array.Sort method, however, everytime I use that method it throws an exception, any ideas
I have attached my code for you to see what I am doing.