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

C#

 
AnswerRe: How to copy DataTable contents into SQLite table? Pin
OriginalGriff26-Jul-21 21:06
mveOriginalGriff26-Jul-21 21:06 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
Alex Dunlop26-Jul-21 21:16
Alex Dunlop26-Jul-21 21:16 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
Alex Dunlop26-Jul-21 22:58
Alex Dunlop26-Jul-21 22:58 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
OriginalGriff26-Jul-21 23:09
mveOriginalGriff26-Jul-21 23:09 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
Alex Dunlop27-Jul-21 0:39
Alex Dunlop27-Jul-21 0:39 
AnswerRe: How to copy DataTable contents into SQLite table? Pin
Richard Andrew x6428-Jul-21 2:36
professionalRichard Andrew x6428-Jul-21 2:36 
QuestionRTD communication error (COM) / .ConnectData(Int32 topicId, Object[]& parameters, Boolean& newValue) Pin
Juliano Zucatti26-Jul-21 10:14
Juliano Zucatti26-Jul-21 10:14 
QuestionHow to shuffle an array VS Windows Form Application? Pin
Sofi081326-Jul-21 0:26
Sofi081326-Jul-21 0:26 
I need help C# VS 2019 Windows Form Application. I am new!!!I want to shuffle an integer array and use the values on my buttons when I click on my ButtonNext. I have got some tips but not working.
- e is not accepted?
- shuffledArray[] is not accepted?

C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;
using System.Windows.Forms;
namespace Dari1MainPage_v002
{
public partial class Exercise1 : Form
{
public Exercise1()
{
InitializeComponent();
}
private void btnNext_Click(object sender, EventArgs e)
{
int[] originalArray = { 0, 1, 2, 3 };
var rng = new Random();
var shuffledArray = originalArray.OrderBy(e => rng.NextDouble()).ToArray();

btnAns1.Text = shuffledArray[0];
btnAns2.Text = shuffledArray[1];
btnAns3.Text = shuffledArray[2];
btnAns4.Text = shuffledArray[3];
}
}
}

AnswerRe: How to shuffle an array VS Windows Form Application? Pin
OriginalGriff26-Jul-21 0:40
mveOriginalGriff26-Jul-21 0:40 
GeneralRe: How to shuffle an array VS Windows Form Application? Pin
Sofi081326-Jul-21 1:22
Sofi081326-Jul-21 1:22 
AnswerRe: How to shuffle an array VS Windows Form Application? Pin
Richard MacCutchan26-Jul-21 0:42
mveRichard MacCutchan26-Jul-21 0:42 
QuestionHow to find average value for duplicate keys in Dictionary? Pin
Alex Dunlop24-Jul-21 4:29
Alex Dunlop24-Jul-21 4:29 
AnswerRe: How to find average value for duplicate keys in Dictionary? Pin
Alex Dunlop24-Jul-21 6:29
Alex Dunlop24-Jul-21 6:29 
GeneralRe: How to find average value for duplicate keys in Dictionary? Pin
Gerry Schmitz24-Jul-21 6:44
mveGerry Schmitz24-Jul-21 6:44 
AnswerRe: How to find average value for duplicate keys in Dictionary? Pin
OriginalGriff24-Jul-21 6:47
mveOriginalGriff24-Jul-21 6:47 
AnswerRe: How to find average value for duplicate keys in Dictionary? Pin
BillWoodruff28-Jul-21 3:11
professionalBillWoodruff28-Jul-21 3:11 
QuestionEfficient method to build a CSV string Pin
Vikas Mishra Jul202123-Jul-21 10:46
Vikas Mishra Jul202123-Jul-21 10:46 
AnswerRe: Efficient method to build a CSV string Pin
Dave Kreskowiak23-Jul-21 11:59
mveDave Kreskowiak23-Jul-21 11:59 
AnswerRe: Efficient method to build a CSV string Pin
Richard Andrew x6423-Jul-21 12:18
professionalRichard Andrew x6423-Jul-21 12:18 
AnswerRe: Efficient method to build a CSV string Pin
Gerry Schmitz24-Jul-21 6:20
mveGerry Schmitz24-Jul-21 6:20 
QuestionHow to get double value in string format? Pin
Alex Dunlop23-Jul-21 7:48
Alex Dunlop23-Jul-21 7:48 
AnswerRe: How to get double value in string format? Pin
OriginalGriff23-Jul-21 8:12
mveOriginalGriff23-Jul-21 8:12 
GeneralRe: How to get double value in string format? Pin
Alex Dunlop29-Jul-21 6:20
Alex Dunlop29-Jul-21 6:20 
GeneralRe: How to get double value in string format? Pin
OriginalGriff29-Jul-21 6:32
mveOriginalGriff29-Jul-21 6:32 
GeneralRe: How to get double value in string format? Pin
Alex Dunlop29-Jul-21 6:48
Alex Dunlop29-Jul-21 6:48 

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.