Questions tagged as 'c#'

3
answers

Write to a Notepad C #

Can someone help me with the following. I want to put a button in my program, which when clicking, write the contents of a Textbox in a Notepad Document in the folder that we want.     
asked by 10.04.2015 / 13:38
2
answers

Why can not I declare a variable with a number in front?

I'm curious to know why not being able to create variables with a number up front. I did some tests in JavaScript, ActionScript and C #. var 4teste:String = "teste"; //ActionScript, erro! var 4teste = "teste"; //Javascript, erro! String 4teste...
asked by 29.07.2015 / 15:43
2
answers

Implement composite key C #

I'm running some tests and I've been able to implement using this form: public class Residencia { public object Id { get { return String.Concat(Cidade, Estado); } set { } } priva...
asked by 14.04.2014 / 14:24
1
answer

Fill in a collection type property

Good evening folks how to populate a collection type property using this type of structure in a class: public class Order { public string orderNumber {get; set; } public DateTime orderDate {get; set; } private D...
asked by 20.06.2015 / 03:46
1
answer

Error in SOAP communication. Lack of tag termination character in XML

It took some time to implement communication with SOAP WebServices in legacy applications written in Delphi 6 . The WebServices that I needed to communicate with these systems were written in Delphi (newer versions with unicode) and C # (asa...
asked by 25.04.2015 / 01:59
2
answers

What is the difference between implementations of IDisposable?

I confess that I still do not understand everything about manipulating the destruction of an object in C # and now, when testing Visual Studio 2015 Preview , when implementing a class I have included the inheritance of IDisposable and...
asked by 24.06.2015 / 03:00
1
answer

Save files from a DataGridVIew

I would like to know how do I get all the content that was passed to a DataGridView and save it to an Excel file. So far I have this: private void btnDiretorio_Click(object sender, EventArgs e) { folderBrowserDialog.RootFo...
asked by 17.12.2014 / 14:39
2
answers

TransactionScopeOption what's the difference between the options?

I was doing a search on the options for TransactionScope and found the following settings: Required A transaction is required for the scope. If it already exists, it uses an environment transaction. Otherwise, it creates a new transactio...
asked by 18.10.2016 / 13:23
4
answers

Is there a C # functionality similar to PHP __call?

I have a lot of experience with PHP, and as I'm starting with C # now, it's going to be common for me to want to compare one language with another to find out if I can do something similar. In PHP, I can add a functionality to a class so that...
asked by 28.06.2016 / 16:18
3
answers

Inserting registry and retrieving ID generated by SQL Server 2012

I want to insert a record into a table, retrieve the ID that was generated by AUTO_INCREMENT and insert records into other tables, using that ID. But, I want to do this all using BeginTransaction . How could I do this? I'm doi...
asked by 23.11.2015 / 12:49