Questions tagged as 'c#'

1
answer

Is it possible to get a parent attribute where the class defines the child attribute?

Assuming I have the following hierarchy: [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public class GrandpaAttribute : Attribute { public GrandpaAttribute() {} } public class ParentAttribute() : Gran...
asked by 03.04.2018 / 17:06
1
answer

LiveChart - Fill Cartesian Graph with Query Data Sql Server

I have a DataContext set in a CartesianChart that does not display data ... no error is displayed, just guess I am making wrong use of the DataContext and I can not fix it, I'm using the LiveChart-WPF package Xaml: <lvc:Cart...
asked by 13.12.2017 / 22:46
1
answer

How does the life cycle dependency injection work?

How does the 3 life cycles of a dependency injection work such as singleton, transient and scope?     
asked by 13.12.2017 / 23:22
2
answers

Pass values from one object to another form C # [duplicate]

I have a system, where after the user logs in, I pull a XML from various data about it and I save on attributes of an object, however there is another form to do the password change, where I need the User_ID of the first How can I pass values...
asked by 25.11.2017 / 17:13
1
answer

Error UnityEngine.Debug: Log (Object)

Personally my app is ready and when I compile it, it is giving this error:    UnityEngine.Debug: Log (Object) How do I stop receiving this error? Do not compile it into it. Does anyone know why it stops debugging?     
asked by 26.10.2017 / 21:14
1
answer

Make a query on a specific node of an XML file in C #

I have a login system in C # and a following XML file: <?xml version="1.0"?> <Usuarios> <Usuario> <User_ID>001</User_ID> <Password>010309</Password> <Password_Change_...
asked by 28.10.2017 / 21:59
1
answer

Show specific error in ASP.NET MVC

I created a website that works normally, but when I upload it to the hosting server, it shows an error:    Application Server Error '/'. As the error is very generic, it says to include the line <customErrors mode="Off"/> in m...
asked by 28.10.2017 / 15:21
1
answer

How to limit decimals using C #

I'm having some trouble limiting the decimal places in C #. double x = 1,41293 I wanted to output only from 1.412 I have already tested the following code: Convert.ToDecimal(x).ToString("0.00", CultureInfo.InvariantCulture) and...
asked by 04.10.2017 / 13:06
1
answer

Problems with the excel connection string

I have the following code snippet that connects to Excel, however it returns me the error: string sFileXLSX = ConfigurationManager.AppSettings["ExportPerformanceEntrega"]; string strConnXLSX = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='"...
asked by 03.10.2017 / 22:18
1
answer

How to do a SUM in different table fields in the Entity Framework?

This is the SQL that I have as an example, would you like to do the same with Linq ? select SUM(iv.precoMediano * oi.quantidade) as total from orc_orcamentoItem oi inner join orc_insumoValor iv on oi.codigo = iv.codigoSinapi where...
asked by 05.10.2017 / 15:17