How to put a variable within the message box? The code comes down I think it's self explanatory.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
us...
Every time you move an item up or down a listBox it loses the focus of the item.
I can not always focus on the item.
For example: suppose my list has 200 items. So I want to move the item that is in position 160 to the 159, so once...
See the method below:
public void TesteLambda() {
List<String> selecoes = new List<string>();
selecoes.Add("USA");
selecoes.Add("Brasil");
selecoes.Add("Itália");
selecoes...
What are the @model and Model variables in a view ?
In my view I use this at the beginning of the code:
@using Html5DataList.Models
@model List<Estabelecimento>
And to access the data, I use it like this:
@foreac...
I have the following model :
public class Crm_Analise
{
[Key]
public int id { get; set; }
public string cod_item_CRM { get; set; }
public string TAG { get; set; }
public string data_creat { get; set; }
public str...
try {
await DoFooAsync();
} catch (Exception e) {
if(e is TaskCancelledException || e is UnauthorizedAccessException) {
// ...
}
throw;
}
The block catch of the above excerpt checks the type of exception captured...
How to create a runtime class, or runtime , dynamically from a Dictionary<TKey, TValue> , for example, with C #?
Dictionary<string, string> dicionario = new Dictionary<string, string>();
dicionario.Add("nome", "string"...
I have a column of type varchar in the database that takes a JSON. This column is the description of a company, but in 4 languages. The logic I have is as follows:
{
"PT":"Descrição com "aspas" quebra o meu código",
"ES":" "...
protected void btnSave_Click(object sender, EventArgs e)
{
List<ProdutoAmortizacaoCreditoDias> aDay = new List<ProdutoAmortizacaoCreditoDias>();
ProdutoAmortizacaoCreditoDias ee = new ProdutoAmortizacaoCreditoDias(...
I'm modeling a system for Academies.
I created 2 models,
Modality
public class Modalidade
{
[Key]
public int ModalidadeId { get; set; }
[MaxLength(200)]
public string Nome { get; set; }
[Newt...