Questions tagged as 'c#'

1
answer

How to pass a parameter to DataPrpetyName (in DataGrid) C #

How can I pass a parameter there? For example changing the id_inss to id_example? I found no way to do it.     
asked by 16.08.2018 / 14:52
1
answer

Could not load type 'ProjectName.MvcApplication' when duplicating project

I duplicated my project in Visual Studio as follows: 1 ° I entered the file system and gave CTRL C + V to the folder SiteTeste which is the project folder. 2 ° I renamed the folder to Siteteste2 and then renamed the fi...
asked by 24.07.2018 / 22:25
1
answer

Pages .aspx in View folder in ASP.MVC project

Good afternoon guys, I am a beginner in MVC architecture and am having a question in an ASPNET.MVC project. I would like to know if it is possible in the "View" folder of the project, put an "aspx" page together with the "cshtml" files. If...
asked by 27.07.2018 / 21:57
4
answers

How to break line using StreamWriter?

I have this code that generates a log whenever the service is finished, but it may happen that I have unprocessed NF and I need to list it for easy identification. Example 100 NF were not processed. In this case you are listing everything on...
asked by 26.06.2018 / 18:59
1
answer

SQL Server Sum Sum Error on DAO Layer

I'm trying to show the result of SUM in the DAO layer, the query after the expected result, but in the field where the sum is shown, does not show an error. A procedure in Sql Server ALTER PROCEDURE [dbo].[RelatorioDcv] @dateInicio date, @d...
asked by 21.08.2018 / 16:56
1
answer

Method that works without calling you directly

I'm messing with the Entity Framework and I was doing mapping for a Many to Many class. What happens is that I used a method that I can use within DbContext to rename a table, and it works without problems. But I was wondering how t...
asked by 21.08.2018 / 21:05
1
answer

The operator "==" can not be applied to operators of type "string" and "long"

Hello, good evening. I am doing a job for college in C # and I do not have much experience. I was running the program and the error described in the title appeared. The piece of code is this: public Produto BuscarProdutoPorCodigo(long codigoPr...
asked by 14.06.2018 / 22:23
1
answer

Xamarin.Android application with Bing Maps

I saw that the Bing Map API does not provide an Android SDK. How could I create a Xamarin.Android app with Bing Maps?     
asked by 25.06.2018 / 16:34
1
answer

How do I get the name of a variable within a method?

I need to access the name of a variable within a method. Example: public class A { public A() { string nameToWrite = "thisdoesntmatter"; B.GetName(nameToWrite); } } public class B { public static GetName(string nameIr...
asked by 20.06.2018 / 13:06
1
answer

Prevent duplicate registration with C #

I'm having difficulties with registration in duplicity. How do I make the data after the user fill out the form at the time of saving the data compared to the one in the database, if it has any repeated field it does not save the form data?...
asked by 30.07.2018 / 21:46