|
Hi all,
I am developing a windows service using C#.I need to set this service for a domain user.Only this user is able to start the service.
I put my account type as User.but it is still open for other user .
How to do this.
Please help me.
Thanks
Narendra
|
|
|
|
|
You can use WindowsIdentity and WindowsPrincipal Class
|
|
|
|
|
asdfsadf
Just do the American thing and shoot him... - Jim Crafton on Linux Users
Wh3n my l33t skillz 1mpr0v3, I w1ll h4ck M$, 4nd th3n wh0 w1ll b3 l4ugh1ng ? N0t Bill. H4 h4 h4 h4 h4 h4 h4. - Christian Graus
|
|
|
|
|
hhhhhh
In India, when someone says "mad cow", you know it's actually a bull charging at him.
-- Rohit Sinha
|
|
|
|
|
Stop posting crap to the forums!!!!
|
|
|
|
|
Hi,
I am kind of confused about using type "String" and "string", I understand that String is a class and string is a premetive type, but I do not understand when should I use String and when should I use string ? Is there any performance issue related in these different types ? say for example, if I use String type, is it more performance friendly than string type ?
Thank you.
|
|
|
|
|
They're the same bloody thing!
string is merely an alias for String .
|
|
|
|
|
There is no performance difference since they are the same...
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
String is the actual underlying CLR (.NET Framework) data type while string is simply the C# alias (keyword) for the String class. They are identical and there are no performance concerns.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
hi ,
There are no differences between string and Stirng.
The name "string" is an intrinsic type that is mapped to "String" class.
-Mohan Kumar
|
|
|
|
|
They are the same. The string keyword is an alias for System.String .
There is no difference in performance, as it's the same type. The only difference is that the string keyword works even if you don't have using System; at the top of the page.
In some rare places you can only use the keywords and not the system type. For example you can specify the type int for an enum, but not the System.Int32 type.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
bashiwala wrote: I understand that String is a class and string is a premetive type,
This is a C# forum, what you are describing is Java.
|
|
|
|
|
No difference when both can be used, as stated by a number of other posters. However, I have come accross two instances where you are required to use one or the other. The first is in the using statement:
using BaseType = System.UInt32;
using BaseType = uint; The second is in enumerations:
public enum foo : uint {
...
}
public enum foo : System.UInt32 {
...
} Other than these two examples, I have yet to discover any difference.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Skippums wrote: the using statement
That's a using directive, not a using statement.
|
|
|
|
|
Touche! At first when I read your reply, I thought, "Wow, way to be anal-retentive about unmeaningful semantics." But then I remembered that there actually IS a using statement for things that implement the IDisposable interface, so your response is valid (and appreciated). Thanks for the correction,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
And any time I can point that out I will. I'm anal that way.
|
|
|
|
|
Hello,
I have written several applications with C# and have never had this problem:
I have an application who's process remains in TaskManager even when i've closed
the application. Is there something obvious I might be missing?
Thanks..
|
|
|
|
|
|
Any multi-threading involved, directly or indirectly? A second thread could have been started, the main thread won't end until it does.
only two letters away from being an asset
|
|
|
|
|
I'm using a webclient. Does this open its own process ?
If so what is the "form_close" event? I guess i need to kill
the webclient in this event. right?
Thanks
|
|
|
|
|
Unleash a debugger on it and see what it's up to.
Steve
|
|
|
|
|
IS this a sub process? If so, make sure you exit or kill it before closing the outer process.
|
|
|
|
|
Hello All,
I can't seem to find this control by the above name. I'm sure i exists in .NET or am I wrong.
I just need a dialog like the OpenFileDialog that allows me to choose a directory.
Thanks
|
|
|
|
|
FolderBrowserDialog, IIRC.
|
|
|
|
|
grrr,
Thanks the one.
cheers
|
|
|
|