Saturday, September 26, 2015

How to serialize an object to XML without getting xsi and xsd

To remove namespaces all together

just add

var ns = new XmlSerializerNamespaces();
ns.Add("""");
and then

var xmlSerializer = new XmlSerializer(typeof(Project));

xmlSerializer.Serialize(fs, project, ns);

but if you want to keep xmlns only with xsi and xsd you should add default namespace to XmlSerializer like this

var defaultNamespace = "http://schemas.microsoft.com/developer/msbuild/003";
var xmlSerializer = new XmlSerializer(typeof(Project), defaultNamespace);
 
xmlSerializer.Serialize(fs, project, ns);

Saturday, September 19, 2015

Repeat row value in Cross-Tab crystal report

Create a new formula field.
In this formula field, joint all selected column i.e. column1 & column2 & column3. This will create a field which has all distinct values and include this field in your cross tab before the non repeating column.Now all required values will repeat in each row as you like.
Regards

Tuesday, September 8, 2015

What .NET version are you running (2.0, 4.5, 4.5.1 or 4.5.2)

From .NET 2.0 to 3.5

Right click on C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll and choose properties
Go to Details tab and look at file version

.NET 4.0, 4.5, 4.5.1 and 4.5.2

Right click on C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll and choose properties
Go to Details tab and look at file version