Questions tagged as 'c#'

1
answer

How to develop an asynchronous mechanism to test pings?

I'm having a slowness problem with a transaction that pings to see if certain IP's are accessible. It turns out that this transaction tests more than 20 different IP's, which makes the total transaction time is 2 minutes. To decrease the total t...
asked by 27.08.2014 / 21:52
1
answer

Get HeaderText from a column in a GridView

When I go through the event RowDataBound of a GridView , I want to get the value of headertext of the column but I can not. An example I want to get: if (e.Row.RowType.ToString().Equals("Header")) { } else if...
asked by 03.06.2014 / 13:50
2
answers

Is there any non-HQL way to bulk update with NHibernate?

I'm having a routine that will set a flag in several records that meet certain requirements, and I'd like to keep that in control of NHibernate . However, I have not found any way to do a bulk update (update batch), with the FluentNHibern...
asked by 20.05.2014 / 21:48
1
answer

Doubts about implementation of Lazy Load and Dependency Injection

The scenario is simple, it has a PersonPass class that has linked to it a list of Contacts (instances of physical persons), Telephones (instances of a Phone entity), and a list of Addresses (instances of an Address entity) / p> I have in the c...
asked by 01.05.2015 / 17:35
1
answer

How do I make a batch file run an Application Console passing parameter?

I have an Application Console that the% method of Program.cs (where it starts the application) receives an input . Follow the code below: static void Main(string[] args) { var input = Console.ReadLine(); ControleEstado.IniciaCo...
asked by 28.04.2015 / 18:26
1
answer

How to open an executable that requires elevation via C #?

The following code attempts to be able to open an executable file so that you can pass arguments to it once it has been opened. For the code as it is presented, error returned is:    Unhandled exception: Required operation requires elevati...
asked by 27.09.2018 / 18:59
2
answers

Timing when querying between 2 date ranges

I have a query where I query between 2 date ranges. On these dates, I apply DbFunctions.TruncateTime to filter searches for dates only, ignoring the time.    Note: these are DateTime fields .Where(p => DbFunctions.TruncateTime(p....
asked by 03.09.2018 / 20:58
1
answer

How to validate the JSON schema in C #?

Follow json (it only has 1 error, it can have several errors): { "errors": [ { "code": "XX-55", "path": "customer.id", "description": "Cliente não encontrado" } ] } Another example of the return: (Multiple erro...
asked by 30.08.2018 / 16:10
1
answer

Error 400 when sending request to ESocial (C #)

I'm getting 400 error response to executing the SOAP request on eSocial servers. The error occurs in this command: using (HttpWebResponse resposta = request.GetResponse() as HttpWebResponse) I installed the certificate chains. I installe...
asked by 10.09.2018 / 15:04
1
answer

Consume DLL made in Delphi 7 in C #

I need to create a DLL in Delphi 7 and consume it in C #, when the parameters and return are int there are no problems, the problem occurs when I try to use string in return, I put in Delphi a MessageDlg and I saw that the input parameter is goi...
asked by 12.09.2018 / 21:19