Questions tagged as '.net'

4
answers

Why this division in class instantiation in C #?

In the book " Use the Head - C # , the author declares classes in a way that I did not understand their utility, according to example: public partial class Form1 : Form { Farmer farmer; public Form1 () { InitializeComponent(...
asked by 30.01.2017 / 18:55
2
answers

Syntax error in SELECT WHERE using ADO.Net parameters [closed]

Does anyone understand this error and get a solution? Code:OleDbConnectionConSelect=newOleDbConnection();ConSelect.ConnectionString=Properties.Settings.Default.dbInvoice;ConSelect.Open();OleDbCommandCmmSelect=newOleDbCommand();CmmSelect.Comm...
asked by 29.08.2016 / 18:09
5
answers

I want to put the number of characters and put it even or odd

But my code is giving error. namespace Impar_ou_parr { class Program { static void Main(string[] args) { string NumLetras; Console.WriteLine("Digite uma Palavra: "); NumLetras = Conso...
asked by 10.01.2017 / 13:27
2
answers

What value is checked in a condition operation with value assignment to a variable?

I have a method that does a check and the return of this method I store in a variable of type bool . When I execute this operation, does C # test the value of the variable or the return value of the method? Example: bool retorno =...
asked by 23.05.2017 / 19:36
0
answers

How to use HasMorePages on this occasion?

Well, I have a printing system here that is working perfectly. The problem I'm facing is regarding the use of bool HasMorePages . I'm not sure how to implement it to print multiple pages if the content does not fit into one. Take a look at...
asked by 23.11.2014 / 02:40
2
answers

ToList () returning read-only

Follow the code below: using (var db = new Entities()) { var result = db .Tabela1 .Select(x => new { x.Coluna1, x.Coluna2 }) .ToList(); foreach (var item in result)...
asked by 30.10.2017 / 22:26
2
answers

Comparing two objects and copying conditionally

I have the following classes: public class Pessoal { public int ID { get; set; } public string CPF { get; set; } public string PIS { get; set; } public string NOME { get; set; } ... ... ... } public class Dominio...
asked by 16.10.2017 / 15:45
2
answers

Create product classes and photos and initialize

I have a class Produto and within that class I have a class Categoria and a Class Foto . 1 Product may only have 1 category, but may have multiple Photos. The problem is with the photos. I did so: public class P...
asked by 15.01.2016 / 13:38
4
answers

Object reference not set to an object instance in array

I have a problem. I have to do a rental program where you tell the data of 5 movies, and then the program lists all the information! And it's mandatory to make a class for this! I have already done the class DadosFilme , and instanciei...
asked by 06.09.2018 / 20:26
3
answers

Manipulating TextBox

Simply fill in the fields Modelo , Placa , Km and this will be saved in the multiline fields below: ButwhenIclickthe"Save" button, the result is completely opposite to what you expected. I wanted each field to be one ahe...
asked by 25.01.2018 / 20:04