Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
AnswerRe: Applications on Servers Pin
Zoltan Balazs8-Jun-08 0:27
Zoltan Balazs8-Jun-08 0:27 
QuestionWhen do we have to use delegate in C#? Pin
Mohammad Dayyan7-Jun-08 22:46
Mohammad Dayyan7-Jun-08 22:46 
AnswerRe: When do we have to use delegate in C#? Pin
MarkB7777-Jun-08 23:44
MarkB7777-Jun-08 23:44 
GeneralRe: When do we have to use delegate in C#? Pin
Mohammad Dayyan8-Jun-08 0:52
Mohammad Dayyan8-Jun-08 0:52 
AnswerRe: When do we have to use delegate in C#? Pin
Zoltan Balazs8-Jun-08 0:31
Zoltan Balazs8-Jun-08 0:31 
GeneralRe: When do we have to use delegate in C#? Pin
Abdul Gafoor8-Jun-08 21:06
Abdul Gafoor8-Jun-08 21:06 
GeneralRe: When do we have to use delegate in C#? Pin
RobScripta8-Jun-08 21:24
professionalRobScripta8-Jun-08 21:24 
GeneralRe: When do we have to use delegate in C#? Pin
Abdul Gafoor8-Jun-08 23:12
Abdul Gafoor8-Jun-08 23:12 
Smile | :) the previous example did not do its job even though it show the delegates asynchronous ability.

Something assignable gives you the flexibility and scalability.
just look at this situation;

delegate void CipherInvoker(byte[] array);

CipherInvoker cipher;

public void ChooseCipher()
{
if(option == "RSACipher")
cipher = new CipherInvoker(RSACipher);
else if(option == "DESCipher")
cipher = new CipherInvoker(DESCipher);

CipherFile("blah", cipher);
}

public void CipherFile(string filname, CipherInvoker cipher)
{
// blah blah
cipher();
//blah blah
}

lets assume that , you found out new efficient and secure way of ciphering or u want to implement ciphering with a another alogorithm;
then u can implement it and u can use it without altering unnecessary places

u may change like

public void ChooseCipher()
{
if(option == "RSACipher")
cipher = new CipherInvoker(RSACipher);
else if(option == "DESCipher")
cipher = new CipherInvoker(DESCipher);
else if(option == "MyCipher")
cipher = new CipherInvoker(MyCipher);

CipherFile("blah" ,cipher);
}
Questiondeploying Release folder Pin
ASysSolvers7-Jun-08 22:06
ASysSolvers7-Jun-08 22:06 
AnswerRe: deploying Release folder Pin
Zoltan Balazs8-Jun-08 0:32
Zoltan Balazs8-Jun-08 0:32 
GeneralRe: deploying Release folder Pin
ASysSolvers8-Jun-08 0:38
ASysSolvers8-Jun-08 0:38 
GeneralRe: deploying Release folder Pin
Zoltan Balazs8-Jun-08 0:42
Zoltan Balazs8-Jun-08 0:42 
QuestionGet path to location user started setup.exe from [modified] Pin
Dave Buhl7-Jun-08 21:08
Dave Buhl7-Jun-08 21:08 
AnswerRe: Get path to location user started setup.exe from Pin
mav.northwind7-Jun-08 23:30
mav.northwind7-Jun-08 23:30 
GeneralRe: Get path to location user started setup.exe from Pin
Dave Buhl8-Jun-08 8:09
Dave Buhl8-Jun-08 8:09 
GeneralRe: Get path to location user started setup.exe from Pin
mav.northwind8-Jun-08 19:01
mav.northwind8-Jun-08 19:01 
QuestionImmediate Help Pin
Saiyed Alam7-Jun-08 19:49
Saiyed Alam7-Jun-08 19:49 
AnswerRe: Immediate Help Pin
DaveyM697-Jun-08 20:41
professionalDaveyM697-Jun-08 20:41 
GeneralRe: Immediate Help Pin
Saiyed Alam7-Jun-08 21:13
Saiyed Alam7-Jun-08 21:13 
GeneralRe: Immediate Help Pin
DaveyM697-Jun-08 23:19
professionalDaveyM697-Jun-08 23:19 
GeneralRe: Immediate Help Pin
Saiyed Alam8-Jun-08 0:59
Saiyed Alam8-Jun-08 0:59 
GeneralRe: Immediate Help Pin
Colin Angus Mackay7-Jun-08 23:35
Colin Angus Mackay7-Jun-08 23:35 
AnswerRe: Immediate Help Pin
mav.northwind7-Jun-08 21:00
mav.northwind7-Jun-08 21:00 
GeneralRe: Immediate Help Pin
Saiyed Alam7-Jun-08 21:14
Saiyed Alam7-Jun-08 21:14 
GeneralRe: Immediate Help Pin
Colin Angus Mackay7-Jun-08 23:38
Colin Angus Mackay7-Jun-08 23:38 

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.