Click here to Skip to main content
15,881,852 members
Home / Discussions / C#
   

C#

 
GeneralRe: Connecting to a database and transferring data securely Pin
User 940410617-Oct-12 9:45
User 940410617-Oct-12 9:45 
GeneralRe: Connecting to a database and transferring data securely Pin
SledgeHammer0117-Oct-12 10:02
SledgeHammer0117-Oct-12 10:02 
GeneralRe: Connecting to a database and transferring data securely Pin
User 940410617-Oct-12 10:34
User 940410617-Oct-12 10:34 
Questionsend email html format in email body asp.net c# Pin
rahultiway1916-Oct-12 7:51
rahultiway1916-Oct-12 7:51 
AnswerRe: send email html format in email body asp.net c# Pin
fjdiewornncalwe16-Oct-12 8:33
professionalfjdiewornncalwe16-Oct-12 8:33 
AnswerRe: send email html format in email body asp.net c# Pin
Bernhard Hiller16-Oct-12 21:29
Bernhard Hiller16-Oct-12 21:29 
QuestionFunction Accepting Parameters of Any Type Pin
ASPnoob16-Oct-12 2:17
ASPnoob16-Oct-12 2:17 
AnswerRe: Function Accepting Parameters of Any Type Pin
Pete O'Hanlon16-Oct-12 2:26
mvePete O'Hanlon16-Oct-12 2:26 
The examples you post aren't really suitable for handling in a single method because the internal implementations are too different. In other words, they don't have common behaviour, so you shouldn't try to treat them as though they do.

On a general note, you can use generics to pass in a type to a method when you want to be able to use different types, decided at compile time. To do this, you would declare it like this (changing the array to a generic list instead):
C#
public void MyFunction<T>(List<T> myCollection){
}

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Function Accepting Parameters of Any Type Pin
Dave Doknjas16-Oct-12 11:14
Dave Doknjas16-Oct-12 11:14 
AnswerRe: Function Accepting Parameters of Any Type Pin
Eddy Vluggen16-Oct-12 3:01
professionalEddy Vluggen16-Oct-12 3:01 
Questionhow to get an data from data Gride view in C# Pin
vinodnchavan15-Oct-12 21:39
vinodnchavan15-Oct-12 21:39 
AnswerRe: how to get an data from data Gride view in C# Pin
Richard MacCutchan15-Oct-12 22:16
mveRichard MacCutchan15-Oct-12 22:16 
AnswerRe: how to get an data from data Gride view in C# Pin
Abhinav S16-Oct-12 20:36
Abhinav S16-Oct-12 20:36 
QuestionSuggest a solution. Pin
Ambika Jadhav15-Oct-12 20:36
Ambika Jadhav15-Oct-12 20:36 
AnswerRe: Suggest a solution. Pin
Pete O'Hanlon15-Oct-12 22:10
mvePete O'Hanlon15-Oct-12 22:10 
AnswerRe: Suggest a solution. Pin
Eddy Vluggen16-Oct-12 2:03
professionalEddy Vluggen16-Oct-12 2:03 
GeneralRe: Suggest a solution. Pin
Pete O'Hanlon16-Oct-12 2:42
mvePete O'Hanlon16-Oct-12 2:42 
GeneralRe: Suggest a solution. Pin
Eddy Vluggen16-Oct-12 3:00
professionalEddy Vluggen16-Oct-12 3:00 
GeneralRe: Suggest a solution. Pin
Ambika Jadhav16-Oct-12 19:56
Ambika Jadhav16-Oct-12 19:56 
Questionplay video in memory stream Pin
SumithF15-Oct-12 19:48
SumithF15-Oct-12 19:48 
AnswerRe: play video in memory stream Pin
Pete O'Hanlon15-Oct-12 23:24
mvePete O'Hanlon15-Oct-12 23:24 
AnswerRe: play video in memory stream Pin
Eddy Vluggen16-Oct-12 2:00
professionalEddy Vluggen16-Oct-12 2:00 
QuestionVS2008 deployment not creating directories Pin
Wolfram Steinke15-Oct-12 15:04
Wolfram Steinke15-Oct-12 15:04 
AnswerRe: VS2008 deployment not creating directories Pin
Dave Kreskowiak15-Oct-12 17:29
mveDave Kreskowiak15-Oct-12 17:29 
QuestionNo overload takes 5 arguments error (C# datagrid) Pin
saiprakash031515-Oct-12 11:13
saiprakash031515-Oct-12 11:13 

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.