Click here to Skip to main content
15,883,705 members
Home / Discussions / C#
   

C#

 
AnswerRe: Connecting to a database and transferring data securely Pin
BobJanova17-Oct-12 1:51
BobJanova17-Oct-12 1:51 
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 
Hi all,
I would like to write a function of type Bool that checks an array for a certain value or a function of type Void to simply sort an array. If I write a function for only a particular array type, the function is pretty straight forward but inflexible. However, if I want the function to work on any kind of array regardless of it's type, it is pretty tricky. I have tried to do this by using a For Loop in the function. Then I tried to pass in the name of the array and it's length as parameters but got stuck. The problem is if I pass in the name of an array as a parameter, that parameter must have a type. Then I tried to use the ForEach Loop where I can enter the array name but it seems it also needs to know what array type it is dealing with. The following are what I have tried:

C#
public bool myFunction(ARRAYTYPE myArrayName, int myArrayLength)
       {
           for(int i = 0; i<myArrayLength;i++)
           {
             //Check for null;
           }
       }


C#
public void myFunction(ARRAYTYPE myArrayName )
        { 
           foreach (ARRAYTYPE value in myArrayName)
           {
	    //Sort
           }
	}


I'm beginning to think this can't be done but I'm really hoping someone has a solution. Thanks in advance for your reply.

modified 16-Oct-12 8:42am.

AnswerRe: Function Accepting Parameters of Any Type Pin
Pete O'Hanlon16-Oct-12 2:26
mvePete O'Hanlon16-Oct-12 2:26 
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 

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.