.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

A Definite Assignment Anomaly

Posted By: Venkat     Posted Date: February 04, 2010    Points: 2   Category :.NET Framework
n interesting and little-known fact about the C# compiler is that this is reported as a definite assignment error if the struct is compiled from source code, but not if the struct is in a referenced assembly! What is the reasoning behind this seemingly anomalous behaviour?

View Complete Post

More Related Resource Links

Task assignment to user without read access in 2007 results in no email to assignee, no warning to a

It appears (from observation and searching) that SP 2007 will not send a task assignment email when the assignee does not have read access for the assigned task and there is no warning when assigning a task to someone who will be unable to read it. I have not been able to find any mentions of attempting to address this quirk by either an item event listener or a workflow that would either prevent the assignment or task the originating user to fix the issue by either changing the assignment or having them added to the appropriate group.  I could see one done badly causing a cascade of tasks. The approaches that I've thought about are: Attempt to block assignment by hooking ItemAdding and ItemUpdating on the task content type.  In ItemUpdating, you could use SPListItem.DoesUserHavePermissions since the SPListItem should be there, but you'd may have check the list since I don't think SPListItem is available at that time.  I could see this causing problems when the assignment is via workflow or something that doesn't like other code interfering with its task creation. Hooking ItemAdded and ItemUpdated to assign a new task to the assigning user to either change the assignment or have the assignee added to the users with access to the site. Define a workflow which could be enabled for a list that would check if any new or modified task is assigned to users with

Database Anomaly

Hi I have a table call Employee, and got a field name call Employee Name Employee Name -    -, -    -                              %%%,                                   (Gpsi) Dr Ac, Baruah (Gpsi) Dr Ap, Dhital 0, 0 1 To 1, Centre ABAYOMI, EMJ 4, US 5F4MBL01, 5F4MBL01 5Jxths01, 5Jxths01 A&E Dept(Rochdale, Zts) NULL ABAYASIRIWARDA, JM Shaw, A NULL Zzzzzzzzzzzzzz, Aaaaaaaaaaaa   From this example data, I need to get only bolded records only, rest of the records are garbage records.   Eg: garbage Records like: "A&E Dept(Rochdale, Zts) " has got a '&'  sign is not a valid  employee name                                         "1 To 1, Centre" has got  a '1'  is not a valid  employee name                                          "%%%," has got a '%'  sign is not a valid  employee name   what is the best way to identify only valid emplyee names ?      Please help me to solve this problem   Sujithf

Notification not working on task assignment

Hello all, On a task list when "Read access" is set to "only their own", and you select "Yes" for "E-Mail Notification", the user is not being notified when a task is assigned to them. This was supposedly fixed in the Feb 2010 CU (see http://support.microsoft.com/kb/978396/en-gb) where it says... "You are no longer notified when a task is assigned to you. This issue occurs when you set Read access to Only their own." We're on the June 2010 CU and it doesn't seem to be fixed, or perhaps I'm missing something? I've found others who have this issue post Feb 2010 CU (see http://sharepointalert.info/2010/07/email-when-ownership-is-assigned-item-level-permissions/) Notification works fine otherwise, so their's no email issues etc. Can anyone explain to me why this does not work? Cheers, Phil.

Unable to change textbox values after manual assignment



In my webapp, I have a DropDownList_OnSelectedIndexChanged that assigns values for a number of <asp:textbox'es depending on which entry is selected...

       public void ModifyProjectIDBox_SelectedIndexChanged(object sender, EventArgs e)


            int tempJobID = Get_Selected_Report();

            dbCommandString = "SELECT Name, Address, State, Awarded, StartDate, EndDate, HomeLocal FROM dbo.ProjectInfo WHERE ProjID = " + tempJobID;

            dbComm.CommandText = dbCommandString;


            dbReader = dbComm.ExecuteReader();


                ModifyProjectNameBox.Text = dbReader[0].ToString();


            ModifyProjectAddrBox.Text = dbReader[1].ToString();

            ModifyProjectStateBox.Text = dbReader[2].ToString();


How to find the Sum of a definite number of elements in a hierarchy in a cube



I guess my Query is pretty simple, but I am very new to MDX so having a problem in formulating the same. I need to find out the top 10 members in my hierarchy on basis of a measure and then need to sum all the others in the Hierarchy as "All Others". To explain it in a bit of detail, Suppose I have a Geography Hierarchy containing Cities A, B,C...till Z. Now I want the population (measure) of the top 10 cities and in the 11th position I want the sum of all the rest cities (which are not counted in the top 10) for two years say 2010 and 2009 and then want the absolute difference of that as well. The result set should look like,


DataGridView object column 'data type' assignment

How do I assign a 'data type' to an 'unbounded' datagridview object

The Application variable's value assignment in asp page not reflecting in .aspx page.


We are migrating ASP application into ASP.Net. We are migrating module by module.

In our application we are using Application variable in global.asax. like below, 

Application("ABC") = "Not Avail."

Application("DEF") = "Not Avail." 

One of the existing ASP page assigning the value for this Application variable like below,

Application("ABC") = "ABC"

Application("DEF") = "DEF" 

The newly assigned value for this Application variables only coming in .asp pages not in .aspx pages. 

Is there any limitation in Application variables like .asp code application assignment will not reflect in .aspx pages?

Multi-Line, Rich Text Field anomaly


When a user clicks on Edit Item for a previously populated and saved List item in SharePoint Services 3.0, the "edit item page" appears but the rich-text multi-line field is blank ... until it is right clicked on in the white space of the multi-line field, then the content that had been previously saved appears.

Should the user fail to right-click in the white space of the multi-line field before saving the List item again, the content previously saved will be saved over as blank. Only recoverable by version control (if enabled for that List).Not tested on

Office XP or Internet Explorer v6.

Office Pro 2007
Internet Explorer v8
Windows XP SP3
SharePoint Services 3.0 SP2 CUAug2010

Column Setting:
Append Changes to Existing Text = NO (default)
Specify the type of text to allow = Rich Text

I was able to reproduce the issue on different desktops with different List items on different Sites for both MOSS 2007 and WSS 3.0.  Clearing the browser cache doesnt resolve it.  I've proven it to

Merge Replication - Publisher Identity Range Assignment with Disconnected Subscriber


Hello everyone,

I have a merge replication topology setup as follows...  Publisher - SQL 2008 SP1, Distributor - SQL 2008 R2 (RTM), Subscriber - SQL 2008 SP1.

I recently had my subscriber disconnected for a couple days.  During this time, I was getting the following error on my publisher:

The insert failed. It conflicted with an identity range check constraint in database 'production', replicated table 'dbo.CustomerOrder', column 'CustomerOrderId'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent.

I understand why I would normally get this error, but if the publisher and distributor are both online, why didn't the publisher attain a new range from the distributor after it hit its threshold?  Is this expected behavior whenever a subscriber is disconnected?

Thanks in advance.


Workflow Assignment


How can I assign the workflow to particular user no other users can approve/reject even see the item. Only the person who create the item can see and approver can see/approve/reject.





Moderator Note: Do NOT ask people to mark posts as answers. I will delete your posts here if you do not remove this from your sig.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend