Questions tagged as 'c#'

1
answer

How to read / translate the keyword yield?

I am studying about the keyword Yield in C# , and I have this question: how to read this word in Portuguese (structured?). Is it something like "return the current value of the enumerator"? Would not it have a one-word translation...
asked by 09.03.2015 / 01:03
1
answer

What does T mean in .NET?

I'm working on a project and I saw a lot of code like this public class ExemploCollection<T> { ... } And I do not understand what this <T> means. What's the name of it, what do I look for? How does this work? What does...
asked by 22.12.2013 / 00:24
2
answers

Why use Bytes instead of using Image? What is the best practice?

I'd like to know why to use the data type Bytes instead of using Image itself. If the SQL Server database has the Image data type, then it should be easier and more convenient to insert it in Image right mode? I would lik...
asked by 10.02.2014 / 19:25
1
answer

How to produce JSON in the format that Highcharts expects?

I have the following code in C #: Dictionary<string, object> dataResult = new Dictionary<string, object>(); dataResult["data"] = new List<object[]>(); dataResult["name"] = i; foreach (var item in query) { object[] values...
asked by 15.02.2014 / 13:57
1
answer

VB6 always executes the 2nd function even the 1st being False

The if in VB6 always executes the 2nd function even if the 1st is False , C # does not execute the 2nd function if the 1st is already false. How can I put vb6 running the 2nd function, only if the 1st is true? C # code: if...
asked by 12.03.2018 / 10:50
1
answer

Add grid data to the bank

I have a loan screen and I have a datagrid with a checkbox checkbox and I would like to add only the row selected by the user in the database, how can I do it? Loanscreencode:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentM...
asked by 19.01.2016 / 17:10
1
answer

How to get attribute dynamically

How would I do the following PHP code in C #? class teste{ public $x = 10; public $y = 10; } $n = new teste(); $a = "y"; print_r($n->{$a}); Note that the dynamism is in the variable $a , in which if I change to x i...
asked by 23.12.2015 / 01:45
1
answer

Emission and control of software license registration file

I have a system for controlling and issuing electronic license registration files so that I can control how many machines my software can run. My teacher advised me to use the processor's CPUID to validate and generate a license file (get C...
asked by 21.12.2015 / 01:15
2
answers

Xamarin Error - aapt.exe / resources

I installed VisualStudio 2015 Community, with Xamarin, up to its beauty. But I have problems, not only I, I saw in several places, that a lot of people are with the same errors. Unfortunately I could not find the solution yet, I hope someone...
asked by 26.04.2016 / 13:10
1
answer

Voice recognition in Pt-BR [duplicate]

How to use Speech Recognition when my OS (Windows 8 x64) is in Pt-BR? I want to use commands in English. I'm using the following code: private void Form1_Load(object sender, EventArgs e) { SpeechRecognizer sr = new Spe...
asked by 03.09.2015 / 20:04