Questions tagged as 'c#'

2
answers

How to make the code not catch the ASCII Code of a variable?

I'm having a problem trying to add numbers that are in a variable, because you're getting the ASCII code from them. How do I get the number directly inside a variable? string bin = "1001001"; string final = ""; for (int i = 0; i < bin.Le...
asked by 23.06.2017 / 03:28
2
answers

Claims Identity MVC

I'm having a hard time implementing Claims to perform user authorizations in my project, I've read a lot but can not execute. I'm using the NHibernate.AspNet.Identity for this reason I can not run as in forums and tutorials read, but I'm n...
asked by 06.07.2017 / 05:08
2
answers

Distinct in linq does not work

I made this linq in my model: public static List<MontaArvoreAcao> CriarListaArvoreAcao() { RupturaEntities db = new RupturaEntities(); var _listaUnidade = ( from r in db....
asked by 23.09.2014 / 18:44
2
answers

Login to a web site for the program

I have a site programmed in PHP with login and I'm making a desktop application (Windows) and I'm trying to login to it from those system on the web. My system in PHP works as follows: it creates a session in PHP and stores session-relevant d...
asked by 20.09.2014 / 23:18
2
answers

Find a snippet of an HTML

I get a string , and it contains an HTML. Here is a table, and its columns: <td width="24%" valign="top" border="1" style=" BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT...
asked by 10.11.2014 / 15:31
1
answer

Doubts about Design Patterns - Idempotency Messages

I'm trying to create an application sample that can call a function / method and after a certain time it checks whether the process has already been executed, if not, call the same function / method again and check the previous progress if it is...
asked by 14.07.2017 / 21:31
1
answer

There is no such thing as a C #

This is C # error, or I'm doing something wrong because in my logic this should work perfectly. public partial class Form1 : Form { Banco Bbanco; Bbanco = new Banco(); }     
asked by 14.08.2017 / 05:41
2
answers

How to split elements from an array using the For loop?

Program Summary Good morning, I'm developing a calculator that asks the user for the number of numbers that will be calculated, the operation and the numbers in question. To save the values, I use an array . The code that calculates the a...
asked by 18.07.2017 / 01:36
1
answer

When to use String and StringBuilder [duplicate]

There is another question about What is the most appropriate way to concatenate strings? . It explains the possible types of concatenations in C# . But when should we use System.String and when should we use System.Text.Str...
asked by 29.08.2017 / 10:58
2
answers

Working with a DateTime instance without the time information

My tests had been running successfully, when "by magic" one of them began to fail: var data1 = DateTime.Now.AddDays(1); ...processos ...processos var data1 = DateTime.Now.AddDays(1); Assert.Throws<DataException>(() =>...
asked by 21.11.2015 / 02:24