Questions tagged as 'c#'

1
answer

User Control C #

I have the following user control being used in a Form: public partial class CampoTelefone : UserControl { private void maskedTextBoxTelefone_Validating(object sender, CancelEventArgs e) { //validações } } Af...
asked by 01.07.2016 / 19:58
1
answer

How to simulate the click of a button via code?

Buttons in WPF applications do not have Button.PerformClick . So, how could I simulate the click of a button via code?     
asked by 20.12.2016 / 22:26
1
answer

What is Associative Table?

Well, I see some examples of codes using associative tables. But I'm not sure what this term means, its applicability, concept etc ... What is an associative table?     
asked by 27.12.2016 / 20:30
2
answers

Command button does not work inside ListView Xamarin Forms MVVM

I'm trying to create a button with the Command event inside a ListView in MVVM , but it's not falling on the event in ViewModel . How can I make this button Command access your method in ViewModel ? And also...
asked by 26.12.2016 / 14:32
1
answer

Differences in Constructors Using Property vs. Field

What's the difference between: namespace WMB.CieloB { internal class FuncoesCielo { internal FuncoesCielo(int iDC, Boleto boleto) { IDCliente = iDC; this.boleto = boleto;...
asked by 22.04.2016 / 14:31
3
answers

Send All CheckBox via Post

I'm trying to send all the CheckBox from my View, however, I can only send the ones that are selected via FormCollection Controller public ActionResult Index() { List<ListaCheckBox> listacheck = new List<ListaCheckBox>();...
asked by 29.04.2016 / 17:47
1
answer

Show data from multiple models in the view

I have the following problem: In a view I will show data from 8 different tables and I have the following code that I put together to take the data to the view. public ActionResult Index() { var avisos = (from av in neEAD.mot_avis...
asked by 17.05.2016 / 21:35
1
answer

How to add the BUILTIN \\ Administrators group in SQL Server to non-English operating systems?

During the installation of my application on a server, the following line is executed: using (var com = con.CreateCommand()) { com.CommandText = "CREATE LOGIN [BUILTIN\Administrators] FROM WINDOWS"; com.ExecuteNonQuery(); } This cod...
asked by 19.05.2016 / 15:03
1
answer

Execute builder of an Attribute

How do I call the constructor of an attribute before the constructor of the decorated class? For example, I have my attribute: using System; namespace T.WinForm { public class TesteAttribute : Attribute { public TesteAtt...
asked by 11.05.2016 / 02:27
3
answers

How to download a file from a URL using C #

Developing a project in C # I came across the following situation, I need to download files from some URL's, what is the best way to do this? Would there be any way to download a progress bar together?     
asked by 17.03.2017 / 18:55