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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

Dispose sample in MSDN is buggy? incorrect?

Posted By:      Posted Date: October 24, 2010    Points: 0   Category :.NET Framework
 
  Public
 Overloads
 Sub
 Dispose() Implements
 IDisposable.Dispose
Dispose(True )
GC.SuppressFinalize(Me )
End Sub

Well, the above is from a veebee sample but it applies to c# or anything else
as well. The point is,

should the above not call GC.SuppressFinalize BEFORE Dispose(true)?
Otherwise possibly race conditions between finalizer and the manual dispose?







View Complete Post


More Related Resource Links

MSDN sample Dllimport unable to load DLL

  

Hi,

I tried out the sample described in MSDN "extern (C# reference)" (Example 2 and 3, the one which created an unmanaged dll called Cmdll.dll, then used it in cm.cs)

It doesn't work. I'm guessing path problem. Following is the error message.

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'Cmdll': Th
e specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at MainClass.SampleMethod(Int32 x)
   at MainClass.Main()

The generated dll is in the same folder as the cm.exe. I copied the dll to the System32 folder. None works.

Any help appreciated.

 


ContextMenu does not work Sample from Msdn "How to:Implement ICommandSource"

  

Hi, 

I am learning WPF , so I downloaded this sample from MSDN: http://msdn.microsoft.com/en-us/library/ms771361(VS.90).aspx

I cannot execute the command from the ContextMenu.

I think there is something wrong with the CommandParameter, but I do not understand what it is?

<TextBox.ContextMenu>
        <ContextMenu>
         <MenuItem Command="{x:Static custom:Window1.FontUpdateCommand}"
              Header="Update Font via Command"
              CommandParameter="{Binding ElementName=lbContextMnu,
                   Path=SelectedItem.Content,
                   Converter={
                   StaticResource StringConverterResource}}">
          <ListBox Name="lbContextMnu">
           <List

Abstract Factory Design Pattern (Sample in C# and VB .NET)

  
An abstract factory provides an interface for creating families of related objects without specifying their concrete classes. Sometimes one wants to construct an instance of one of a suite of classes, deciding between the classes at the time of instantiation. In order to avoid duplicating the decision making everywhere an instance is created, we need a mechanism for creating instances of related classes without necessarily knowing which will be instantiated.

MSDN Abstract Classes Link

  
MSDN Reference For Abstract Clases

Looking for ASP.Net JQuery Post Sample

  

Hi, iam looking for a JQuery Post Sample, without reload of the current Page. I want on a webform enter a search text, onclick on the submit button i want get (webservice?) back clean html code that will be shown in a div tag
i found something like

<form id="formsearch" onsubmit="jQuery.ajax({type:'POST',dataType:'html',data:jQuery(this).serialize(),success:
function(data, textStatus){jQuery('#ajaxcontent').html(data);},beforeSend:function(XMLHttpRequest){$('#indicatorSearch').
show();},complete:function(XMLHttpRequest, textStatus){$('#indicatorSearch').hide();},
url:'/Search'}); return false;" action="/Search" method="post">

but how is the source asp.net (or webservice) build up?

can you give me some samples, how i can realize that with asp.net

thanks


Editor's Note: Not Your Father's MSDN

  

Changes are coming to MSDN Magazine. They begin this month, with the unveiling of a number of new, monthly columns.

Keith Ward

MSDN Magazine February 2010


Inside MSDN: Consuming MSDN Web Services

  

Get the inside track on how the MSDN team uses Web Services to power MSDN2.

Craig Andera

MSDN Magazine October 2006


Inside MSDN: Building the MSDN Aggregation System

  

Have you visited msdn2. microsoft. com? It's the new online face of the MSDN® Developer Tools and Enterprise Server documentation. The infrastructure behind it includes a system developed by my team at Microsoft for aggregating information related to our content.

John Mollman

MSDN Magazine July 2006


Inside MSDN: Using InfoPath as a Reporting Solution

  

I love the part of my job that lets me write code and develop software. In addition to those responsibilities, however, I manage a development organization that's working on a number of large strategic projects.

Larry W. Jordan Jr.

MSDN Magazine March 2005


Inside MSDN: Designing URLs for MSDN2

  

This is the first installment of a new column about MSDN® projects: what we're doing, how we're doing it, and what we're learning along the way. It will be written by MSDN staff with the goal of sharing the team's experiences in solving the real-world business problems MSDN faces.

Tim Ewald

MSDN Magazine February 2005


Editor's Note: Vote Early and Often for MSDN Magazine

  

As this issue of MSDN Magazine goes to press, Election Day is drawing near. Like many candidates for office, this magazine sports some bold cover lines and bright, appealing pictures. Unlike those same politicians, however, we will keep working for you month after month, year after year, even after you elect to purchase the magazine.

Joshua Trupin

MSDN Magazine November 2004


Editor's Note: Camp MSDN Magazine

  

Welcome back to the autumn term! We hope you had a great summer. We've been hard at work roasting marshmallows, making gimp bracelets, and learning how to make a baked brie using only twigs and berries.

Joshua Trupin

MSDN Magazine September 2004


Resource File: MSDN Online Developer Centers

  

When you're looking for information about a specific technology, don't you wish you could rely on one site to point you to the most pertinent content? Now you can. Based on feedback from software developers, MSDN Online has centralized all developer information on specific technologies so you don't have to hunt in several locations.

MSDN Magazine June 2003


Windows UI: Our WinMgr Sample Makes Custom Window Sizing Simple

  

Programmers using Visual Basic have always had an advantage over C++ programmers when it comes to component and window sizing. There are many third-party Visual Basic-based solutions to this age-old problem, but unfortunately, there are few elegant alternatives for the C++ crowd, short of using a full-fledged windowing toolkit. This article explains how to circumvent the tedious task of hardcoded pixel arithmetic. It starts by introducing a window sizing rules system, and then moves on to show how CWinMgr, a data-driven class, can intelligently manage an MFC application's window sizing.

Paul DiLascia

MSDN Magazine July 2001


Categories: 
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