0

I have used ArrayList and List as well and came to know that List is reference type so that we can not use this in case of dotnet Remoting.

As suggested in ArrayList vs List<> in C# post that

ArrayList belongs to the days that C# didn't have generics. 
It's deprecated in favor of List<T>.

List<double> listCollection = new List<double>(); // Good in case of single machine project but not in case of dotnet remoting.
ArrayList list = new ArrayList(); // Can store multiple type of object.

So we should not use ArrayList.

Now considering Array, then Array creation must have Array size as

double[] abc = new double[];    // Not correct
double[] abc = new double[10];  // Correct.

I have also seen MarshalByRefObject as in https://learn.microsoft.com/en-us/dotnet/api/system.marshalbyrefobject?view=netframework-4.7.2 but I do not want to use this.

So my question is that which is the best way to use a collection of the same type of class without using any of the above and which is most suitable for .net remoting and can be Serializable?

Manish Jain
  • 1,197
  • 1
  • 11
  • 32
  • @JohnB yeah that's right, as per project, I have to use this old technology. This is not in my hand. Can you suggest any other technology? – Manish Jain Dec 18 '18 at 07:50
  • is there anypoint suggesting if you have to used it? – jazb Dec 18 '18 at 07:51
  • @JohnB; Yes, of course, may be beneficial in other projects and I am eager to learn new technologies. – Manish Jain Dec 18 '18 at 07:52
  • why not serialize the object then send it? Then you can reconstruct it on the remote side? – Hasan Emrah Süngü Dec 18 '18 at 07:53
  • .NET Remoting was identified as a problematic architecture. It's used for cross-AppDomain communication, which is no longer supported. Also, Remoting requires runtime support, which is expensive to maintain. For these reasons, .NET Remoting isn't supported on .NET Core – jazb Dec 18 '18 at 07:53

0 Answers0