Questions tagged as 'c#'

2
answers

MessageBox error

I tried to implement the code below in a Windows Phone 8.1 project, it had already been implemented in Windows Forms successfully. What should I change to be valid for Windows Phone 8.1? private void reset_Click(object sender, RoutedEventAr...
asked by 18.07.2014 / 04:57
1
answer

How to use generic types with type parameters?

I have a dictionary that serves as a type mapper with C #. var Map = new Dictionary<Type, Type>() { {typeof(A1), typeof(A2)}, {typeof(B1), typeof(B2)}, {typeof(C1), typeof(C2)}, {typeof(D1), typeof(D2)} }; I intend to...
asked by 22.04.2014 / 22:20
1
answer

Error in encryption in C #

Hello!  I already tried to parse the code but I can not find the answer. using System; using System.Collections.Generic; using System.Text; using System.Linq; using System.Web; using System.IO; using System.Security.Cryptography; /// <summ...
asked by 24.04.2014 / 14:00
1
answer

When mapping class to viewModel, some data is lost

I have a query that returns a client and its phone, but when mapping the class to the viewModel , I lose the phone data: query: public Cliente ObterClientePorId(Guid ClienteId) { var consulta = Contexto.Cliente.Join(Conte...
asked by 27.08.2015 / 20:18
2
answers

Is it possible to assign the default value of a property with an attribute?

I'd like to be able to declare a property as: [DefaultValue(10)] public int Maximo { get; set; } And when it was used, it already came with the value started in 10 . However the attribute does not assign the value, when I try to use:...
asked by 23.12.2013 / 03:27
1
answer

What is the best way to do a database backup online

There is a client of mine that has two machines, one of which is the server where all the data in the database is stored, and the other is the box. However, there is the customer's concern that something happens to the server that the data is...
asked by 06.02.2014 / 15:57
2
answers

How to remove the selected option in multiple ComboBoxes?

I have several components of type ComboBox with identical options. The user must select one of them (eg "Name"). How do I make an option in any of the ComboBox , it disappear from all ComboBox ? Do I need a bank? Or a IL...
asked by 13.03.2014 / 21:18
1
answer

How do I make my Main Form know when a secondary form has been closed, without using Parent and Child?

I have my main form (image below), and in it a Split Container . I open a secondary form (what is currently being displayed) in panel2 of SplitContainer , in which the user selects an account to make financial transactions. As s...
asked by 30.01.2014 / 20:26
2
answers

subtraction of two double properties []

I have a class called funcoes.cs I need to create a property that stores the initial X, Y, and X, Y final values, thought of: public double[] PosicaoInicialXY { get; set; } public double[] PosicaoFinallXY { get; set; } then it...
asked by 24.03.2014 / 21:18
2
answers

How to update ASP.NET Repeater in real time?

I have a Repeater on a side div that receives the amount of products from the cart and needs to be updated with every click. I have tried rpt.Databind() in the Click event but repeater only refreshes with a refresh of the browser .. An...
asked by 18.03.2014 / 17:37