|
my service should start a program which MUST run in LocalSystem-Account and not in a user-account.
i fixed that problem! i activated the network-share on my server for NullSession-access; and so my LocalSystem-account can access that share.
thanks.
regards, thilo.
|
|
|
|
|
Great, but you just opened your system up for anonymous attacks. Make sure you have security tight if you're going to do this. Still, the easiest way is to make sure that the SYSTEM account on both machines has the same password. This works in most cases.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I am an extreme newbie (or n00b for the elite) and I REALLY want to learn how to program in C#. I have Herb Schildt's book call 'C#: A Beginner's Guide' and it's very good. However, I like to have a ton of websites to turn to when I have questions. So, could everyone please reply with their best C# referrence websites? It would be much appreciated!
|
|
|
|
|
Well, for starters, CodeProject!
Other good ones:
Some of these links are for .NET in general. Remember that C# is just a language that targets the CLR (see below).
And never forget the important of research skills. Taking a glance at the .NET BCL (base class library) is very important: http://msdn.microsoft.com/library/en-us/cpref/html/cpref_start.asp[^]
All language that target the Common Language Runtime (CLR) have equal access to the BCL. They just use different syntaxes (and shortcuts based on various keywords).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I've noticed a lot of people around here call it the ".NET BCL" instead of the ".NET Framework". I'm curious why that is. Did I miss a memo?
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
The term "BCL" means Base Class Library, and refers to the base classes in the .NET Framework. ".NET Framework" refers to both these classes and the runtime and VM.
|
|
|
|
|
That makes sense, and I can see the need to differentiate. I've just never seen MS refer to it as that and was wondering if it's sort of a defacto term.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Blame Microsoft's marketing department - everyone else does! Fonrtunately, the ".NET" was removed from their server product names and some of their services because everyone was confused!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
My picks are
thecodeproject.com
codeproject.com [the eeeeevil twin]
c-sharpcorner.com
csharphelp.com
msdn.microsoft.com/vcsharp
dotnet247.com
dotnetjunkies.com
Those'll keep ya busy.
The graveyards are filled with indispensible men.
|
|
|
|
|
hi...
based on the inherritance issue i have one more problem. if you see the code below
class base1<br />
{<br />
public virtual void f( )<br />
{<br />
Console.WriteLine ( "In base1" ) ;<br />
}<br />
}<br />
class d1 : base1<br />
{<br />
public void f( )<br />
{<br />
Console.WriteLine ( "In d1" ) ;<br />
}<br />
}<br />
<br />
class Class1<br />
{<br />
static void Main ( string[ ] args )<br />
{<br />
base1 b = new d1( ) ;<br />
b.f( ) ;<br />
}<br />
}<br />
which yeailds In base1
it says base1 b = new d1()
1)why did it mix 2 classes??can we do that?why would we wanan do that??
when called b.f() - f of base1 is called!
2)why is that so?
tks a lot for any help..appreciate it..
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
You forgot the keyword "override"
class d1 : base1
{
public override void f( )
{
Console.WriteLine ( "In d1" ) ;
}
}
|
|
|
|
|
tks for the help....but that didn't answer my question!
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Sorry, didn't read your question well enough.
To understand these concepts you need a book on classes and OOP. It takes too long to explain it well here.
Basically "base1 b = new d1()" says "Create a d1 type of object but treat it as a base1 type of object". This is only possible because d1 inherits base1.
|
|
|
|
|
It's a very simple concept of object oriented programming.
Why can you call .ToString on a Windows Form? Because it's a System.Object AND a System.Windows.Forms.Form. It inherits from System.Object - and when a class inherits from another class, it instanciates the base class; you're essentially creating 2 objects as 1.
The graveyards are filled with indispensible men.
|
|
|
|
|
hi..i am stuck with this problem..its very very confusing and even after reading book i cannot figure it out...can u pls help me?tks a lot
please consider the code :
class base1<br />
{<br />
public void call ( base1 b )<br />
{<br />
b.f( ) ;<br />
}<br />
<br />
public virtual void f( )<br />
{<br />
Console.WriteLine ( "In base1" ) ;<br />
}<br />
}<br />
<br />
class d1 : base1<br />
{<br />
public override void f( )<br />
{<br />
Console.WriteLine ( "In d1" ) ;<br />
}<br />
}<br />
class d2 : base1<br />
{<br />
public override void f( )<br />
{<br />
Console.WriteLine ( "In d2" ) ;<br />
}<br />
}<br />
class Class1<br />
{<br />
static void Main ( string[ ] args )<br />
{<br />
base1 b = new base1( ) ;<br />
d1 o1 = new d1( ) ;<br />
d2 o2 = new d2( ) ;<br />
<br />
b.call ( b ) ;<br />
b.call ( o1 ) ;<br />
b.call ( o2 ) ;<br />
}<br />
}
which yeilds :
In base1
In d1
In d2
prob : i dont understand how this result is generated... confused:
allthe calls i see are thru b..but d gets called???
could u pls explain why this is happing??
tks a lot for any help..
really appreciate it..
tks a lot
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Its the f() that does the printing, and the b.f() in base1 that calls the different implementations of the virtual f method, one for each type. If you have a good book on classes and polymorphism, this will be explained.
|
|
|
|
|
hi..i have another prob. would be glad if you could help..please consider the following code :
class sample<br />
{<br />
public void foo( )<br />
{<br />
Console.Write ( "In sample.foo" ) ;<br />
}<br />
}<br />
<br />
class sampleD : sample<br />
{<br />
protected void foo( )<br />
{<br />
Console.Write ( "In sampleD.foo" ) ;<br />
}<br />
}<br />
<br />
class Class1<br />
{<br />
static void Main ( string[ ] args )<br />
{<br />
sampleD s = new sampleD( ) ;<br />
s.foo( ) ;<br />
}<br />
} which yeilds : In sample.foo
my prob is : how can this happen?? the instance belongs to sampleD and the foo is called of sample...
can u pls help me and tell me why this happens...
tks a lot..
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Open Visual Studio, open the Help menu, select "Index".
Look up "protected keyword" and you will get the full explanation.
|
|
|
|
|
good answer...
but if you read my question its a bit different...isn't it?
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Read about what the keyword "protected" means, and you will understand why the protected method never gets called.
|
|
|
|
|
hi..if you have some free time, i'd appreciate if you can please help me.
please consider the following code :
class sample<br />
{<br />
protected int i ;<br />
public sample( )<br />
{<br />
i = 10 ;<br />
}<br />
}<br />
class sample1 : sample<br />
{<br />
public sample1( )<br />
{<br />
Console.Write ("Hello " + i ) ;<br />
}<br />
}<br />
class Class1<br />
{<br />
static void Main ( string[ ] args )<br />
{<br />
sample1 s = new sample1( ) ;<br />
}<br />
}
which yeilds the result : Hello 10
my prob : AS I CAN UNDERSTAND : in above case the derieved class is accessing the protected attribute of the base class... but i thought in CS that wasn't supposed to happen..
OR am i looking at it wrongly??
pls help..tks a lot
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Open Visual Studio, open the Help menu, select "Index".
Look up "protected keyword" and you will get the full explanation.
|
|
|
|
|
any more explanation??
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
What did you find out about what "protected" means?
|
|
|
|
|
Joseph,
I think that the problem is that some of the folks on this forum may think that your questions are just a little too newbie-ish(?). For example, access modifiers like protected are covered very, very thoroughly in all beginner-level C# programming books, even the bad ones. Have you bought any books? You may also want to consider enrolling in a class somewhere to learn what object-oriented programming's all about. It's simple once you learn it, but learning it is not simple for all people. You won't learn OO programming by asking newbie questions on this forum, either.
So if you were to go off, learn the definition of protected , write some sample code to play around with it, and then you still had questions, it would be a different matter.
The answer to your question in this case is that you are confused on the difference between private and protected . private means that nothing outside of the class (not even child classes) can see the thing so labelled; protected means that only the class itself and child classes can see the thing so labelled. You could have easily found this out by browsing the MSDN help.
I'm not trying to put you down-- it's great that you're learning. Still, to flood this or any forum with questions you can easily answer for yourself amounts to a sort of spam. Also, like I said, I don't think that you will get what you're after this way; your goal should be a good understanding of these concepts.
Thank you.
Jeff Varszegi
|
|
|
|