Click here to Skip to main content
15,896,287 members
Home / Discussions / C#
   

C#

 
AnswerRe:Displaying Messagebox within client Region Pin
Hessam Jalali17-Aug-07 5:45
Hessam Jalali17-Aug-07 5:45 
QuestionHow to get a CSV file into a table? Pin
dorine8217-Aug-07 1:58
dorine8217-Aug-07 1:58 
AnswerRe: How to get a CSV file into a table? Pin
error140817-Aug-07 2:13
error140817-Aug-07 2:13 
AnswerRe: How to get a CSV file into a table? Pin
Justin Perez17-Aug-07 2:19
Justin Perez17-Aug-07 2:19 
QuestionRemoting only runs 4/5 instances Pin
BarbaryS17-Aug-07 1:41
BarbaryS17-Aug-07 1:41 
AnswerRe: Remoting only runs 4/5 instances Pin
kalyan_241617-Aug-07 1:59
kalyan_241617-Aug-07 1:59 
GeneralRe: Remoting only runs 4/5 instances Pin
BarbaryS17-Aug-07 2:02
BarbaryS17-Aug-07 2:02 
GeneralRe: Remoting only runs 4/5 instances Pin
Talal Sultan17-Aug-07 5:01
Talal Sultan17-Aug-07 5:01 
Singleton: When the remote object is set to singleton it means that it will be available to all calling clients. The singleton object is instantiated at the first call of a method (from any client.) When other clients access it, they will be accessing the instance that the first client instantiated. This means that if the first call set a variable myNumber to 10, other clients connecting to the remote object would be able to read that value as well. It basically means that the remote object is shared among all clients.

SingleCall: In this configuration, the remote object is instantiated only for the duration of the method call. If a client is calling a specific method on an object, the object exists only during the execution of the method. Once the method returns, the object is destroyed. Clients cannot share the same remote object in this case.

Example: Suppose you have a remote object myObject. Suppose this object has 2 methods, one called Add that will add 2 numbers and place the result in a global variable myResult of myObject, and one called RetrieveResult that returns myResult.

public void Add(int a, int b)
{
  myResult = a + b;
}

public int RetrieveResult()
{
  return myResult;
}



In Singleton mode:

Client 1 calls myObject.Add(1,1). In this case, myResult is 2.
Client 2 calls RetrieveResult(). The returned value will be 2.

In SingleCall mode:

Client 1 calls myObject.Add(1,1). In this case, myResult is 2.
Client 2 calls RetrieveResult(). The returned value is 0 because the call of RetrieveResult created a new remote object.



-- If this is a post that has been helpful to you, please vote for it. Thank you!

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook

GeneralRe: Remoting only runs 4/5 instances Pin
BarbaryS18-Aug-07 3:27
BarbaryS18-Aug-07 3:27 
Questionresource file error Pin
Maddie from Dartford17-Aug-07 1:12
Maddie from Dartford17-Aug-07 1:12 
QuestionNewbie needs help with Access+OLEDB Pin
Infernojericho17-Aug-07 0:51
Infernojericho17-Aug-07 0:51 
AnswerRe: Newbie needs help with Access+OLEDB Pin
Vasudevan Deepak Kumar17-Aug-07 0:56
Vasudevan Deepak Kumar17-Aug-07 0:56 
GeneralRe: Newbie needs help with Access+OLEDB Pin
Infernojericho17-Aug-07 1:20
Infernojericho17-Aug-07 1:20 
AnswerRe: Newbie needs help with Access+OLEDB Pin
Rocky#17-Aug-07 1:00
Rocky#17-Aug-07 1:00 
GeneralRe: Newbie needs help with Access+OLEDB Pin
Infernojericho17-Aug-07 1:22
Infernojericho17-Aug-07 1:22 
GeneralRe: Newbie needs help with Access+OLEDB Pin
Rocky#17-Aug-07 1:28
Rocky#17-Aug-07 1:28 
GeneralRe: Newbie needs help with Access+OLEDB Pin
Infernojericho17-Aug-07 1:30
Infernojericho17-Aug-07 1:30 
GeneralRe: Newbie needs help with Access+OLEDB Pin
Rocky#17-Aug-07 1:41
Rocky#17-Aug-07 1:41 
AnswerRe: Newbie needs help with Access+OLEDB Pin
Talal Sultan17-Aug-07 1:42
Talal Sultan17-Aug-07 1:42 
GeneralRe: Newbie needs help with Access+OLEDB Pin
Infernojericho17-Aug-07 23:34
Infernojericho17-Aug-07 23:34 
Questiongetting results from console aplication Pin
mizitras17-Aug-07 0:43
mizitras17-Aug-07 0:43 
AnswerRe: getting results from console aplication Pin
Giorgi Dalakishvili17-Aug-07 1:05
mentorGiorgi Dalakishvili17-Aug-07 1:05 
QuestionMessage pumping in long processes Pin
deviao17-Aug-07 0:38
deviao17-Aug-07 0:38 
AnswerRe: Message pumping in long processes Pin
S. Senthil Kumar17-Aug-07 20:47
S. Senthil Kumar17-Aug-07 20:47 
QuestionLinq References Pin
Johan Lombaard17-Aug-07 0:29
Johan Lombaard17-Aug-07 0:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.