473,614 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

generic lists and .NET Remoting

..NET 2.0

Is generic lists faster then tradional lists when sending over a collection
of objects (value by reference) in .NET remoting.

Lets say if a list of object should be sent from a server to the client.
Whould it be better to use generic lists?

Jeff
Jul 31 '07 #1
1 2832
I would say that whether or not a list is generic isn't going to affect
things either way.

The reason is that you have two scenarios when you are using remoting.
You are either marshalling the object across the wire (in which case
serialization is used) or you are making the call into the app domain
(marshal by ref object). When you serialize an object, generics doesn't
really help with that process, since reflection is used (in most general
cases) to determine the members to serialize.

With a marshal by ref object, where the call is made into the app domain
that created the object, it doesn't matter either, because it's just the
call that is marshalled into the app domain, not the whole object instance.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Jeff" <do***@spam.mew rote in message
news:Oi******** ******@TK2MSFTN GP02.phx.gbl...
.NET 2.0

Is generic lists faster then tradional lists when sending over a
collection of objects (value by reference) in .NET remoting.

Lets say if a list of object should be sent from a server to the client.
Whould it be better to use generic lists?

Jeff

Jul 31 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
14504
by: ZenRhapsody | last post by:
Has anyone done any performance testing between new generic Lists and single dimensional arrays? I really like the code flexibility the List provides since I don't know how many items I will have in the list. With my array approach, I have to manage re-sizing the array myself. So, is using List<myClass> x as fast as MyClass x ?
2
1972
by: Greg Buchholz | last post by:
/* I've been experimenting with some generic/polytypic programs, and I've stumbled on to a problem that I can't quite figure out. In the program below, I'm trying to define a generic version of "transform" which works not only on lists, but lists of list, lists of lists of lists, etc. I'm calling it "fmap" and it passes around actual lists instead of iterators (for now). In order to get it to work, I thought I'd have one templated...
0
6841
by: Wiktor Zychla [C# MVP] | last post by:
We do have generic classes, methods and delegates. My question is: what reason prevents us from having generic properties and indexers? // impossible public List<T> GetList<T> { get { ... }
5
2933
by: Andrew Ducker | last post by:
I have something I'm trying to make work with generics, and it seems like it should, but I can't quite get there. I have a subclass of List<Tthat I want to populate automatically. Each different T is populated with a different set of data. Some sample code is given below - which clearly doesn't work, because you can't translate back and forth between the types. Can anyone tell me the right way to solve this kind of problem?
0
1642
by: Mikkel Blanné | last post by:
I haven't been able to find any references to using this combination of technologies (remoting + generic methods + method overloading). I don't think the problem has to do with C#, but I couldn't find a more appropriate place to ask... When I remotely try to call one of the methods in the object below, I get an exception. public class TestObj : MarshalByRefObject {
3
2255
by: Seth Gecko | last post by:
Hi I am working with generic lists of various objects and a control dealing with these lists. For instance: A parent form holds: dim Walls as List(Of wall) dim Segments as List(Of segment) The parent form have a custom control, which have a public sub looking
1
2777
by: Suds | last post by:
Hi, I'm having an issue with invoking a Generic method that takes Generic Arguments. My method signature is public void GenericMethodWithGenericArguments<E, V>(List<EtheFirstList, List<VtheSecondList); I pass the name of the method, the arguments for the "GenericMethodWithGenericArguments" to another method, which is supposed to invoke this method using the Invoke method in the MethodInfo class. My process of invocation is as follows
0
1190
by: =?Utf-8?B?Sm9obiBXLg==?= | last post by:
I am using Remoting (TCP) to access a singleton object in one app (a service) from another app (call it app #2). Using the methods described in competent literature, the server raises an event that is handled in app #2. The event delegate is simple, like "delegate void MyDelegate( MyEventArgs e );". This works fine when both apps are on the same machine and when they are on different machines. Discovering the generic delegates in .NET...
0
1043
by: jappenzeller | last post by:
I've got a coding standard question for generic lists and .NET 2.0. I have created some custom strongly typed lists like, MyClassList:List<MyClass>. We did this because we wanted to reuse some helper methods that are at the list level, for instance, maybe we need to get some type of Average of MyClass's in the list so I have a method Average in the MyClassList class. One of the problems with this is if I use something like Find or FindAll...
0
8180
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8130
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8275
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6088
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5538
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4050
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4121
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1423
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.