Wednesday, March 3, 2010

About CSharp

CSharp Tools

There are nice tools to optimize your work:
  • ReSharper
  • .Net managed (plug-in for ReSharper) resources StyleCop
  • .Net managed assemblies FxCop
  • Reflector
  • GhostDoc
  • NDoc3 (for Mono)
  • NUnit (2.4.8 for mono)
  • xUnit and xUnitContrib for Resharper
  • SilverLight
  • IronPyhton 2.0.1 runtime
  • IronRuby 1.1.3 corresponding to Ruby 1.9
  • Trident Activities and workflow
  • SandCastle (for Mono DXROOT=D:\Sandcastle\;DX_PATH=%DXROOT%\ProductionTools) for help file from API (you need also HtmlHelper HTMLHELP_PATH=D:\HTML Help Workshop)
  • DPack
  • Javascript Parser
  • Jscript Brace Matching Extension
  • Jscript Editor Extensions 
  • Jscript IntelliSense Para Extension
  • Jscript Outlining Extension
  • Jscript Word Highlighter Extension 
  • Microsoft All-In-One Code Framework Sample Browser 
  • Productivity Power Tools 
  • Regex Editor 
  • Spell Checker 
  • VSColorOutput 
  • REP++
  • Web Essentials
  • Web Standards Update  

Set a CSharp class template

We always read the manual.

public class MyClass : IDisposable
#region AttributeMembers
#region PublicAttributes


#region PrivateAttributes

/// Flag for disposed resources private bool _IsDisposed = false; #endregion

#region ProtectedAttributes


#region AttributeAccessors

#region Getters


#region Setters


#region Mutators



#region Constructors

/// Initializes a new instance of the class. public MyClass()

{ }

#region Destructor
/// Releases unmanaged resources and performs other cleanup operations before the
/// is reclaimed by garbage collection.
/// This destructor will run only if the Dispose method does not get called.
/// It gives your base class the opportunity to finalize.
/// Do not provide destructors in types derived from this class.
// Do not re-create Dispose clean-up code here.
// Calling Dispose(false) is optimal in terms of readability and maintainability.

#region MethodMembers

#region PrivateMethods
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// true to release both managed and unmanaged resources; false to release only unmanaged resources.

private void Dispose(bool isDisposing)

//Check if Dispose has been called

if (!this._IsDisposed)

{//dispose managed and unmanaged resources

if (isDisposing)

{//managed resources clean

this._DestZip = this._Src2Zip = null;

this._FileZip = null;//~


//unmanaged resources clean

//confirm cleaning

this._IsDisposed = true;




#region PublicMethods

/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// Do not make this method virtual, a derived class should not be able to override this method.
public void Dispose()
#region PublicAbstractMethods
#region PublicOverrideMethods
#region PublicVirtualMethods

C# project file (.csproj)

Edit the .csproj in order to have your custom folder for your solution.
You can add them like :

  <Folder Include="app\" />
  <Folder Include="bin\" />
  <Folder Include="data\" />
  <Folder Include="doc\" />
  <Folder Include="ext\" />
  <Folder Include="ico\" />
  <Folder Include="lib\" />
  <Folder Include="modules\" />
  <Folder Include="obj\" />
  <Folder Include="pkg\" />
  <Folder Include="script\" />
  <Folder Include="src\" />
  <Folder Include="sql\" />
  <Folder Include="temp\" />
  <Folder Include="test\" />


We always read the manual.

After you installed R and RDCOM in windows, Add Reference to COM.
Check if you succeeded in the reference tab.
Now you can use it into code:
//use 4 COM:R(D)COM
using StatConnectorCommonLib;

No comments:


HTMLCode Content