Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Questions Pin
V.9-Jul-14 1:40
professionalV.9-Jul-14 1:40 
GeneralHelp Pin
gsn19708-Jul-14 8:13
gsn19708-Jul-14 8:13 
GeneralRe: Help Pin
Richard MacCutchan8-Jul-14 8:23
mveRichard MacCutchan8-Jul-14 8:23 
GeneralRe: Help Pin
Pete O'Hanlon8-Jul-14 9:37
mvePete O'Hanlon8-Jul-14 9:37 
GeneralRe: Help Pin
gsn197015-Jul-14 21:18
gsn197015-Jul-14 21:18 
GeneralRe: Help Pin
Pete O'Hanlon15-Jul-14 21:44
mvePete O'Hanlon15-Jul-14 21:44 
GeneralRe: Help Pin
gsn197018-Jul-14 0:42
gsn197018-Jul-14 0:42 
Generalneed your help Pin
gsn197025-Sep-14 4:12
gsn197025-Sep-14 4:12 
hi I am getting an error message: Connot implicitly type 'void' to 'string'
here is the code
public partial class Form1 : Form
{

public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string[] strings = { "man", "bites", "mad", "dog" };
dataTextBox.Text = (Permute(strings, Output));


strings[0] = indexTextBox.Text;
strings[1] = indexTextBox.Text;
strings[2] = indexTextBox.Text;
strings[3] = indexTextBox.Text;

}


private void Output(T[] permutation)
{
string data;
data = dataTextBox.Text;
foreach (T item in permutation)
{
dataTextBox.Text = Convert.ToString (item);

}

}
public static void Permute(T[] items, Action output)
{
Permute(items, 0, new T[items.Length], new bool[items.Length], output);
}
private static void Permute(T[] items, int item, T[] permutation, bool[] used, Action output)
{
for (int i = 0; i < items.Length; ++i)
{
if (!used[i])
{
used[i] = true;
permutation[item] = items[i];
if (item < (items.Length - 1))
{
Permute(items, item + 1, permutation, used, output);
}
else
{
output(permutation);
}
used[i] = false;

}
}
}
}
GeneralRe: need your help Pin
Pete O'Hanlon25-Sep-14 4:44
mvePete O'Hanlon25-Sep-14 4:44 
GeneralRe: need your help Pin
gsn197025-Sep-14 20:53
gsn197025-Sep-14 20:53 
GeneralRe: need your help Pin
Pete O'Hanlon25-Sep-14 21:07
mvePete O'Hanlon25-Sep-14 21:07 
GeneralRe: need your help Pin
gsn197025-Sep-14 21:14
gsn197025-Sep-14 21:14 
QuestionPrinting Bytes to printer in MVC Pin
nitin_ion7-Jul-14 23:32
nitin_ion7-Jul-14 23:32 
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter7-Jul-14 23:58
professionalKornfeld Eliyahu Peter7-Jul-14 23:58 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 0:01
nitin_ion8-Jul-14 0:01 
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter8-Jul-14 0:05
professionalKornfeld Eliyahu Peter8-Jul-14 0:05 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 0:07
nitin_ion8-Jul-14 0:07 
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter8-Jul-14 0:14
professionalKornfeld Eliyahu Peter8-Jul-14 0:14 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 1:15
nitin_ion8-Jul-14 1:15 
AnswerRe: Printing Bytes to printer in MVC Pin
Kornfeld Eliyahu Peter8-Jul-14 1:20
professionalKornfeld Eliyahu Peter8-Jul-14 1:20 
AnswerRe: Printing Bytes to printer in MVC Pin
Richard MacCutchan8-Jul-14 1:14
mveRichard MacCutchan8-Jul-14 1:14 
GeneralRe: Printing Bytes to printer in MVC Pin
nitin_ion8-Jul-14 1:16
nitin_ion8-Jul-14 1:16 
GeneralRe: Printing Bytes to printer in MVC Pin
Pete O'Hanlon8-Jul-14 1:33
mvePete O'Hanlon8-Jul-14 1:33 
AnswerRe: Printing Bytes to printer in MVC Pin
Dave Kreskowiak8-Jul-14 5:06
mveDave Kreskowiak8-Jul-14 5:06 
QuestionWindows services Not starting with c# codes Pin
Chinedu Nwankwo7-Jul-14 21:04
Chinedu Nwankwo7-Jul-14 21:04 

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.