Questions tagged as 'c#'

1
answer

Doubt with service rest and with put verb

I need only do an update on two fields of my model. In the get I pass a DTO to my App. The question is: When I go to do my update (verb put) do I need to load all the property or just the one I'm going to upgrade? Like this: [Route("atualiza/{...
asked by 14.09.2017 / 14:57
1
answer

Error Can not implicitly convert type

I'm having an error    CS0029, Can not implicitly convert type int' to UnityEngine.UI.Slider ' How can I resolve it? First Code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Playe...
asked by 15.08.2017 / 20:19
2
answers

C # returns an HTML string

Good, I use the following code to convert a numeric value according to the user's culture: value="@(Model.KnowAcquisition.Cost.HasValue ? Model.KnowAcquisition.Cost.Value.ToString("n2", CultureInfo.CurrentCulture).ToString() : string.Emp...
asked by 10.10.2017 / 18:45
2
answers

Solution C # MVC does not execute JavaScript in IIS

I have a C # solution where I use MVC. In it I have a View for inclusion of product items. In this view I have a DropList as specified below: Drop List <div class="form-group"> @Html.LabelFor(model => model.ProdutoId, "Prod...
asked by 11.10.2017 / 19:26
1
answer

Association between classes or inheritance?

What is the best way to create an association or inheritance where I have the User class and the Academic class and Academic > User User class: public class Usuario { public int Id { get; set; } public int Ma...
asked by 11.10.2017 / 00:17
1
answer

Popular List c #

I am trying to return data from a list in a foreach. In the first foreach, it is returning the correct data, but it is not writing to the nflist variable of the first foreach, so as soon as it passes through it again, it loses the previous data...
asked by 16.10.2017 / 01:22
1
answer

Write a default value inside a given cell in C #

I'm doing a console application that reads data from a worksheet and compares it with values entered in the database. There is a default value, if a field in this worksheet is not filled, I need to get the value of the bank and set it in the wor...
asked by 13.10.2017 / 15:40
1
answer

how to count records from an ini file in C #? [closed]

Como contar Registros de um Aqruivo.ini e usa-las em loop for (int i = 0; i < 15; i++) { Exemplo: no [bot] tenho 5 elementos cadastrados ! ao invez de ser 15 adicionado manualmente ao for eu usaria uma variavel no local ->...
asked by 02.08.2017 / 20:05
3
answers

Adding the data from a sql column C #

My problem is this: I need to add the total hours of the employee that are in the bank, already in a separate column. Just to make it clear, the hours that the employee worked on the day are ready, I want to add these total hours. Note: I think...
asked by 24.08.2017 / 04:55
1
answer

Initialization of the object can be simplified

After updating the nuget (18) packages, I compiled my project and gave this error:    Initializing the object can be simplified It points to these files in my code. GridTextColumn dataLib = new GridTextColumn(); Here is the complete...
asked by 26.10.2017 / 00:23