background preloader

.NET

Facebook Twitter

C# - Accessing Office Word object model through asp.net results in "failed due to the following error: 80070005 Access is denied." How to Parse Command Line Parameters? Nammed Arguments in VB.NET?? IKVM.NET Home Page. Download: 2007 Microsoft Office System Update: Redistributable Primary Interop Assemblies - Microsoft Download Center - Download Details. Welcome to Kanbal.com.

Building On The DLR. I've been playing for some time now with the Dynamic Language Runtime.

Building On The DLR

At first I started simply playing around with its hosting interfaces, but later I realized I really wanted to check more closely how it worked, so I started building a very simple language on top of it. My intention isn't to build a full fledged language out of it, but simply use it to explore interesting aspects of the DLR. It's been a bit complex and frustrating at times because there really isn't much documentation yet [1] on how the DLR works (and how to build on it), but it's been a lot of fun, too!

Fortunately, there's plenty of source code to study when you're looking at the DLR. On the small scale, there's the DLR version of LOLCODE! Note: I don't know if the LOLCODE! A most interesting source of current information on the DLR can be found in Martin Maly's blog, and it is definitely recommended if you're interested in targeting the DLR. Note: Do take everything I mention here with a large grain of salt. Microsoft cuts loose Iron languages. High performance access to file storage Microsoft has officially ended a half-decade flirtation with building its own .NETized scripting languages, and it lost a languages guru to Google in the process.

Microsoft cuts loose Iron languages

The company has handed code and project responsibility for IronRuby and IronPython to "the community," six years after it started the projects and then stuck them in limbo. The IronPython project will be coordinated by Miguel de Icaza, Michael Foord, Jeff Hardy and Jimmy Schementi, with de Icaza and Schementi also co-ordinating IronRuby. Schementi quit Microsoft in August, having complained about a "serious lack of commitment" to IronRuby and dynamic languages in general on .NET by the giant. De Icaza has spent a decade building the open-source implementation of .NET called Project Mono, and more recently, he spun up an implementation of Silverlight, called Moonlight. "Community" is generally the place Microsoft sends the children to die that it cannot kill on its own. Performance Tips and Tricks for ASP.NET Pages Using JScript .NET.

Visual Studio Team Microsoft Corporation January 2002 Summary: This article helps you improve the performance of ASP.NET pages written in JScript® .NET, particularly pages upgraded from ASP pages written in JScript.

Performance Tips and Tricks for ASP.NET Pages Using JScript .NET

Registering Assemblies with COM. A managed component must be registered in the Windows registry before it can be activated from a COM client.

Registering Assemblies with COM

The following table shows the keys that Regasm.exe typically adds to the Windows registry. (000000 indicates the actual GUID value.) Under the HKCR\CLSID\{0000…0000} key, the default value is set to the ProgID of the class, and two new named values, Class and Assembly, are added. The runtime reads the Assembly value from the registry and passes it on to the runtime assembly resolver.

The assembly resolver attempts to locate the assembly, based on assembly information such as the name and version number. IronPython.net / Fholm/IronJS. Javascript/JScript/JScript.NET. Use params for variable arguments. Named and Optional Arguments (C# Programming Guide) The definition of a method, constructor, indexer, or delegate can specify that its parameters are required or that they are optional.

Named and Optional Arguments (C# Programming Guide)

Any call must provide arguments for all required parameters, but can omit arguments for optional parameters. Each optional parameter has a default value as part of its definition. If no argument is sent for that parameter, the default value is used. A default value must be one of the following types of expressions: a constant expression; an expression of the form new ValType() , where ValType is a value type, such as an enum or a struct ; an expression of the form default(ValType) , where ValType is a value type. Optional parameters are defined at the end of the parameter list, after any required parameters. Public void ExampleMethod( int required, string optionalstr = "default string" , int optionalint = 10)

Default Keyword in Generic Code (C#) In generic classes and methods, one issue that arises is how to assign a default value to a parameterized type T when you do not know the following in advance:

default Keyword in Generic Code (C#)

Caller Information (C# and Visual Basic) By using Caller Info attributes, you can obtain information about the caller to a method.

Caller Information (C# and Visual Basic)

You can obtain file path of the source code, the line number in the source code, and the member name of the caller. This information is helpful for tracing, debugging, and creating diagnostic tools. To obtain this information, you use attributes that are applied to optional parameters, each of which has a default value.