Thursday, February 17, 2011
C# Const and Read Only Difference
We have const variables and read only variables. Is there a difference between them?
When you declare a const variable it has to be given a value at the time of declaration.
public const int a = 5;
When you declare read only variables you can give a value at the run time. You don’t have to give the value at the time of declaration. But the thing is you have to give the value in the constructor. You cannot give a value anywhere else.
public readonly int b;
public read(int a)
b = a ;
Const variables are by default static variables.
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
There is a bit of change in CRM 2011 than CRM 4. The code is below. Microsoft.Xrm.Sdk. EntityReference Moniker1 = new Microsoft.Xrm.S...
When you create a new security role from scratch and then assign only that role to a system user and when you log to the CRM site you might ...
Error message “User does not have send-as privilege.” when sending emails programmatically in CRM 2011We were working on sending emails programmatically using CRM and all were working fine. Suddenly we got this error when we tried to send an ...