[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Not able to access TCP Classes in System.Runtime.Remoting.Channels

Murali

9/29/2004 3:23:00 PM

Hi,

I am using .NET 2003 with SP1 and I am not able to access Tcp Classes in
System.runtime.Remoting.Channels, I am new to this and anybody can help on
this issue.

Regards,
R.Muralidharan




8 Answers

Ken Kolda

9/29/2004 4:09:00 PM

0

You need to add a reference to the System.Runtime.Remoting assembly in your
project. Just go to the References folder, righ-click and choose Add. Under
the .NET table, select System.Runtime.Remoting.

Ken


"Murali" <MuralidharanRamakrishnan@hotmail.com> wrote in message
news:%23q0ZdcjpEHA.2340@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I am using .NET 2003 with SP1 and I am not able to access Tcp Classes in
> System.runtime.Remoting.Channels, I am new to this and anybody can help on
> this issue.
>
> Regards,
> R.Muralidharan
>
>
>
>


gwowen

10/23/2009 5:57:00 AM

0

spinoza1111 <spinoza1111@yahoo.com> writes:

> It's not a correct piece of software. It divides by zero when x is
> zero.

Would you describe:

x = *y;

as buggy code?

(Edward G. Nilges)

10/23/2009 8:40:00 AM

0

On Oct 23, 1:57 pm, Gareth Owen <gwo...@gmail.com> wrote:
> spinoza1111<spinoza1...@yahoo.com> writes:
> > It's not a correct piece of software. It divides by zero when x is
> > zero.
>
> Would you describe:
>
> x = *y;
>
> as buggy code?

Not as such, given that all I know is that x is set to y,
dereferenced. Sure, y might not be dereferenceable and may cause a
segment fault.

But this does NOT excuse coding crap like this:

return x>0 ? 1 : -1;

or this:

if (x>0) return 1; return -1;

[and note that compared to the egregious error in both the above code
snippets, it matters not in the slightest whether the programmer has
used ?:, or if].

This is KNOWN to be probable crap because independent of programming
there exists a signum function, and the code communicates:

(1) An intent to "do" signum
(2) An ignorant or uncaring disregard for the case of x==0

Don't worry about whether your code will seem "pretentious" to some
Troglodyte because he doesn't like ?:. Just get it right.

gwowen

10/23/2009 10:24:00 AM

0

spinoza1111 <spinoza1111@yahoo.com> writes:

> Not as such, given that all I know is that x is set to y,
> dereferenced. Sure, y might not be dereferenceable and may cause a
> segment fault.

Its fine if you know that y is pointing somewhere valid.

> But this does NOT excuse coding crap like this:
>
> return x>0 ? 1 : -1;

Its fine if you know that x is not zero.

It's all about the domain of the code fragment. We didn't get the
context so we can't say if its buggy or not. For all we can tell, the
original code fragment was wrapped up as.

if(x !=0) {
x -= x / abs(x);
}

Summary: Unless you know the context, you can't say whether either
code fragment is buggy or not.

(Edward G. Nilges)

10/23/2009 11:46:00 AM

0

On Oct 23, 6:23 pm, Gareth Owen <gwo...@gmail.com> wrote:
> spinoza1111<spinoza1...@yahoo.com> writes:
> > Not as such, given that all I know is that x is set to y,
> > dereferenced. Sure, y might not be dereferenceable and may cause a
> > segment fault.
>
> Its fine if you know that y is pointing somewhere valid.
>
> > But this does NOT excuse coding crap like this:
>
> > return x>0 ? 1 : -1;
>
> Its fine if you know that x is not zero.  

We don't know that. And even if we do (if some "end user" reassures us
that this is so), that can change without notice, and it doesn't hurt
to implement a more easily documented mathematical function...even if
the end user may not know the "signum" function. This is because end
users and requirements change, faster than mathematical terminology.

It never hurts to get it right, UNLESS the end user requires that the
value be -1 (or 1) for x==0. I got the impression that this was not
the case, that instead nobody even thought about x==0. And, the
original code just crashes on divide by zero in this case.
>
> It's all about the domain of the code fragment. We didn't get the
> context so we can't say if its buggy or not.  For all we can tell, the
> original code fragment was wrapped up as.
>
> if(x !=0) {
>   x -= x / abs(x);
>
> }
>
> Summary: Unless you know the context, you can't say whether either
>          code fragment is buggy or not.

(Edward G. Nilges)

10/23/2009 11:59:00 AM

0

On Oct 23, 1:57 pm, Gareth Owen <gwo...@gmail.com> wrote:
> spinoza1111<spinoza1...@yahoo.com> writes:
> > It's not a correct piece of software. It divides by zero when x is
> > zero.
>
> Would you describe:
>
> x = *y;
>
> as buggy code?

In terms of modern OO practice, x = *y is buggy code. This is because
both C Sharp and Java define a subset of all possible programs such
that references are always and everywhere managed, not referencing
storage outside of a known error unless, of course, the runtime
virtual machine is itself buggy; the runtime VM machine will be buggy
with small if nonzero probability p while applications code will be
buggy with a much larger probability P>=10*p.

In terms of modern OO practice, C code is buggy code in all cases. The
probability PP of bugginess of any arbitrary snippet of C code is
>=10p where p is the probability of managed C Sharp code.

Furthermore,

return x>0?1:-1;

is a prima facie bug because the closest mathematical function to what
it does is signum, and it gets signum wrong. Neither programmers nor
end users have the right to create new mathematical functions *ex
nihilo*. A competent programmer, when told to "return 1 when x is
greater than zero, and return -1 when x is less than zero", would ask
"what the goddamn hell should I return when x is zero, dorkwad?"

Managers of software used to brag that "every line of code written in
my 'shop' must have a Biznez Case or else because I'm such a studly
dudley practical man, and I don't put up with no monkey business from
a bunch of faggot math majors", or words to that effect.

I would change that. I would say that ideally, every line of code
would have a referent outside of programming, preferably to
mathematics. That's because in an ideal world there would be no
"business", just meeting human needs.

Malcolm McLean

10/25/2009 7:15:00 PM

0

"Gareth Owen" <gwowen@gmail.com> wrote in message
>
> Summary: Unless you know the context, you can't say whether either
> code fragment is buggy or not.
>
I got bittten with this once. If a construct shows defined behaviour you can
always claim it is th desired behaviour. Even calling fgets() and throwing
away the newline (if the purpose of the program is to throw away newlines).


Richard Heathfield

10/26/2009 6:29:00 AM

0

In <2KKdnYav5oMAPnnXnZ2dnUVZ8i2dnZ2d@bt.com>, Malcolm McLean wrote:

> "Gareth Owen" <gwowen@gmail.com> wrote in message
>>
>> Summary: Unless you know the context, you can't say whether either
>> code fragment is buggy or not.
>>
> I got bittten with this once. If a construct shows defined behaviour
> you can always claim it is th desired behaviour. Even calling
> fgets() and throwing away the newline (if the purpose of the program
> is to throw away newlines).

If the purpose of the program is to throw away newlines, why on earth
would you call fgets()?

#include <stdio.h>

int main(void)
{
int ch;
while((ch = getchar()) != EOF) if(ch != '\n') putchar(ch);
return 0;
}

--
Richard Heathfield <http://www.cpax....
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within