Como Serializar um Objecto para XML e Deserializar um XML para Objecto
Serializar um Objecto para String (XML)
StringWriter sw = new StringWriter();
XmlSerializer serializer = new XmlSerializer(typeof(OBJECT));
serializer.Serialize(sw, getAcessoryEquipmentsRequest.SearchCriteria);
strXML = sw.ToString();
Deserializar uma String (XML) para Objecto
StringReader sr = new StringReader(strXML);
XmlSerializer serializer =...
Codesmith, netTiers and reserved words
Started today using Codesmith tools today after a year or so since the last time that I used this great generation template based tool. I had to generate...
DevDays 2009
Realizou-se a semana passada o DevDays 2009, o evento anual da Microsoft Portugal destinado a juntar profissionais e curiosos em torno das tecnologias da casa, que este ano foi...
Aprovisionamento de sites no IIS6 usando uma aplicação ASP.NET
O exemplo apresentado de seguida permite efectuar a criação de um site no IIS6 a partir de uma template. Esta solução torna-se particularmente útil para cenários em que seja necessário...
The Controls collection cannot be modified because the control contains code blocks (i.e. )
Because I have pages with the markup <%= someVariable%> like <script type="text/javascript">
function ConfirmCallBack(arg)
...
Raven.Studio.zip Index.html not available
I had RavenDb embedded in a aspnet.core web api and I was getting this error when I tried to reach Raven Studio: The following file was not available: index.html....
.NET EF Core 6 support for groupby top(n) queries
EF Core 6 comes with some GroupBy queries improvements. In this post I wanna talk about the improvements related to "group by top(n)" queries.
Let's say we have the following...
How to run another application or batch file from my Visual C# .NET code
Example 1.Running a command line application, without concern for the results:
private void Run(){ System.Diagnostics.Process.Start(@"C:runFile.bat");}
Example 2.Retrieving the results and waiting until the process stops (running the process synchronously):
private...
Enterprise Library: Criar ligação à base de dados de forma dinâmica
Já alguma vez precisaram, usando o Enterprise Library, de estabelecer uma ligação com um número de base de dados variável e em que a base de dados a ligar...
LINQ to XML: How to use it?
Frequently, the most of people use XPATH to do xml manipulation. But if you want another way to manipulate XML, you can use LINQ to XML.Supposing that we have...