Click here to Skip to main content
15,890,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: icon Pin
Andy Moore14-Feb-06 11:32
Andy Moore14-Feb-06 11:32 
GeneralRe: icon Pin
Expert Coming14-Feb-06 17:40
Expert Coming14-Feb-06 17:40 
GeneralRe: icon Pin
Andy Moore15-Feb-06 3:02
Andy Moore15-Feb-06 3:02 
GeneralRe: icon Pin
mostafa_h15-Feb-06 9:37
mostafa_h15-Feb-06 9:37 
QuestionPDF Pin
tabrez_0114-Feb-06 10:41
tabrez_0114-Feb-06 10:41 
QuestionArranging Toolbar window items in IE to a single row .. Pin
sreejnarayan14-Feb-06 10:37
sreejnarayan14-Feb-06 10:37 
QuestionUsing Remoting For Whole Application Pin
mk2014-Feb-06 10:00
mk2014-Feb-06 10:00 
AnswerRe: Using Remoting For Whole Application Pin
malharone14-Feb-06 10:24
malharone14-Feb-06 10:24 
mk20 wrote:
clients to be able to create instances of the remote classes and use their methods and properties.


If this was not the case, then webservices would be an excellent choice. One thing you can do, is expose all the public instance methods as public static methods throuh webservice and pass the object on which to call the method as the parameter to the static method.

You could use remoting, but if you have multiple versions of the program, things may go out of control easily.

Using webservice:
<code>public class Employee
{
	public void PromoteAsSupervisor()
	{
		...
	}
	public void GiveRaise(int value)
	{
		...
	}
	public void AssignProject(Project p, Duration d)
	{
		...
	}
}

public class MyWebService:WebService	//i think that's the base class!
{
	[WebMethod()]
	public void PromoteAsSupervisor (Employee employee, params object[] parameters)
	{
		if (employee==null)
		{
			throw new ArguementNullException("employee");
		}
		else
		{
			employee.PromoteAsSupervisor();
		}
	}

	[WebMethod()]
	public void GiveRaise (Employee employee, params object[] parameters)
	{
		if (employee==null)
		{
			throw new ArguementNullException("employee");
		}
		else
		{
			employee.GiveRaise((int) parameters[0]);
		}
	}

	[WebMethod()]
	public void AssignProject (Employee employee, Project p, Duration d)
	{
		if (employee==null)
		{
			throw new ArguementNullException("employee");
		}
		else
		{
			employee.AssignProject(p, d);
		}
	}

	[WebMethod()]
	public void InvokeMethod (object obj, string method, params object[] parameters)
	{
		//invoke the method on the 'obj' object through reflection
	}
}</code>


- Malhar
QuestionOverriding DataGridViewColumnHeaderCell Pin
Wjousts14-Feb-06 9:48
Wjousts14-Feb-06 9:48 
QuestionQuestion on reflection Pin
malharone14-Feb-06 9:06
malharone14-Feb-06 9:06 
AnswerRe: Question on reflection Pin
leppie14-Feb-06 10:01
leppie14-Feb-06 10:01 
GeneralRe: Question on reflection Pin
malharone14-Feb-06 10:40
malharone14-Feb-06 10:40 
QuestionHow to Marshal a Native Struct Pin
Richard Andrew x6414-Feb-06 8:16
professionalRichard Andrew x6414-Feb-06 8:16 
AnswerRe: How to Marshal a Native Struct Pin
Richard Andrew x6414-Feb-06 8:27
professionalRichard Andrew x6414-Feb-06 8:27 
GeneralRe: How to Marshal a Native Struct Pin
leppie14-Feb-06 10:04
leppie14-Feb-06 10:04 
QuestionExecuting Another Windows Process Pin
MarkMokris14-Feb-06 7:51
MarkMokris14-Feb-06 7:51 
AnswerRe: Executing Another Windows Process Pin
kasik14-Feb-06 8:14
kasik14-Feb-06 8:14 
Questionbest way to read string Pin
cppdotnet14-Feb-06 7:43
cppdotnet14-Feb-06 7:43 
AnswerRe: best way to read string Pin
Joshua Quick14-Feb-06 8:56
Joshua Quick14-Feb-06 8:56 
AnswerRe: best way to read string Pin
cppdotnet14-Feb-06 10:32
cppdotnet14-Feb-06 10:32 
Questionchange global project dbConnectionString during runtime Pin
cpramhofer14-Feb-06 7:23
cpramhofer14-Feb-06 7:23 
AnswerRe: change global project dbConnectionString during runtime Pin
CWIZO14-Feb-06 21:04
CWIZO14-Feb-06 21:04 
QuestionHow to Place a MDI Child on Parent form panel controll Pin
GetFree123GetFree14-Feb-06 6:09
GetFree123GetFree14-Feb-06 6:09 
Questiondword values in .reg files Pin
Lara Pate14-Feb-06 6:08
Lara Pate14-Feb-06 6:08 
AnswerRe: dword values in .reg files Pin
Andy Moore14-Feb-06 6:23
Andy Moore14-Feb-06 6:23 

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.