Questions tagged as 'c#'

1
answer

Error Sequence contains in elements asp.net

Good morning. I'm trying to send a request in ajax in jquery, but it returns me that error. Sequence contains no elements, I'm trying to present data in the bootgrid public ParametrosPaginacao(NameValueCollection dados) {...
asked by 20.03.2018 / 14:34
2
answers

Error connecting to oracle database using web programming in .NET

When attempting to connect to the bank, I got the error according to the attached image. My application is web in .net, visual studio 2010, database oracle sql developed 3.1.07. My code where you get the error: protected int GetRowCounts()...
asked by 21.02.2018 / 17:45
2
answers

Why is the term "Private" in .NET? [duplicate]

Declaring variables without specifying the access level of the variable in C # and Visual Basic .NET ends up making private , only the type / location where it was created can access and / or modify it. However, there is also the keyword p...
asked by 22.02.2018 / 04:00
1
answer

How to resize the font size - WPF?

The following code works with winforms : while (label1.Width < System.Windows.Forms.TextRenderer.MeasureText(label1.Text, new Font(label1.Font.FontFamily, label1.Font.Size, label1.Font.Style)).Width) { label1.Font = new Font(l...
asked by 21.02.2018 / 19:40
1
answer

Error trying to register in C #

I'm creating a program and I need the user to register to log in to it. When running the program, when I try to make a registration this error appears in Visual Studio: "The model backing the 'Bank' context has changed since the database was cre...
asked by 23.06.2018 / 15:40
2
answers

Error creating form with entity framework

An error is occurring that I can not identify I know that the BeginForm in the Create.html of the entity framework, has some send options to do overload, one of them is the one I'm using, whose request, ActionName, ControllerName, FormMethod...
asked by 15.02.2018 / 16:35
1
answer

RichTextBox specific line in bold

I have a RichTextBox where I need to leave the lines of positions [0] and [6] in bold. I have the following code: rtbDadosAdicionais.Select(0, rtbDadosAdicionais.Lines[0].Length); rtbDadosAdicionais.SelectionFont = new Font("", 15, FontSt...
asked by 17.03.2018 / 19:08
2
answers

Record re-registration in the database

In a database table with the fields ProductID, Description, UnitPrice, and some others. I have a screen that allows only the updating of the Unit Price field, at the time of rewriting the record in the database as it should be the routine to re-...
asked by 17.02.2018 / 23:20
1
answer

Recover data from asp.net View

I have the following problem, when I place an order in the quantity field when I put a certain number I have to get it if it is in stock in the bank, and if I have to decrease the quantity in the bank, I do not know how to pass the value of the...
asked by 16.02.2018 / 20:26
1
answer

Simple C # Console App in Visual Studio 2017, quit without showing result

I'm trying to run a simple program that writes "Hello world" in VS2017: namespace OlaMundo { class Program { static void Main() { int num; System.Console.WriteLine("Número :"); num = S...
asked by 17.02.2018 / 20:53