Microsoft has ramped up the security in their latest operating system – Windows Vista, which means that developers now have to pay more attention to certain security constraints imposed by the operating system when developing applications. Those of you readers who have read my prior posts on User Access Control in Vista (and the further reading [...]
Posts Tagged ‘Code’
.NET Wrapper for COM Elevation
Posted in Everything, Software Development, tagged C#, Code, Windows Vista on February 12, 2007 | 11 Comments »
Pass by Reference
Posted in Everything, Software Development, tagged C#, Code on October 25, 2006 | 2 Comments »
Contrary to the beliefs of some developers, .Net reference types do not need to be passed as reference parameters (ref in C#, ByRef in VB) when a method is going to alter the contents of an object instance.
Passing a object reference by reference parameter just means the method can reassign the reference to a new [...]
Failed to open XML parser COM object.
Posted in Everything, Software Development, tagged Code on August 15, 2006 | 3 Comments »
I came across a problem when launching any PPC emulator through Visual Studio’s Device Emulator Manager – I’d receive an error of the sort: Failed to open XML parser COM object.
After digging around Google for a while I found the problem was related to a missing installation of MSXML Parser Version 3 (why MS [...]
C# Value Types and Ranges
Posted in Everything, Software Development, tagged C#, Code on June 1, 2006 | Leave a Comment »
Just because it’s good to know…..
Keyword
Class
Range
bool
System.Boolean
true and false
byte
System.Byte
0 to 255
sbyte
System.SByte
-128 to 127
short
System.Int16
-32768 to 32767
ushort
System.Uint16
0 to 65535
int
System.Int32
-2,147,483,648 to 2,147,483,647
uint
System.UInt32
0 to 4,294,967,295
long
System.Int64
-9,223,372,036,854,775,808 to
9,223,372,036,854,775,807
ulong
System.UInt64
0 to 18,446,744,073,709,551,615
decimal
System.Decimal
-79,228,162,514,264,337,593,543,950,335
to 79,228,162,514,264,337,593,543,950,335
double
System.Double
-1.79769313486232e308 to
1.79769313486232e308
float
System.Single
-3.402823e38 to 3.402823e38
char
System.Char
0 to 65535
Code Access Security – A Primer
Posted in Everything, Software Development, tagged Code, Security on June 1, 2006 | 2 Comments »
Overview
This post serves as a primer for software developers interested in learning about Code Access Security (CAS) in .NET. The following information is not exhaustive of the subject matter and contains the basic overview of Code-Access-Security. Those interested in this subject are encouraged to read further.
The following articles cover code security and are [...]
Right-Click ListBox – Select Item
Posted in Everything, Software Development, tagged Code on April 5, 2006 | 3 Comments »
Useful to know – to select items in a ListBox with a right mouse click wire up the following code to the MouseDown event:
private void LB_MouseDown(object sender, MouseEventArgs e)
{
// Select item if right click.
if (MouseButtons.Right == e.Button)
{
Point pt = new Point(e.X, e.Y);
[...]
Code Snippets
Posted in Everything, Software Development, tagged Code on March 24, 2006 | Leave a Comment »
Like the code snippets in Visual Studio 2005? Want some more? Check out http://msdn.microsoft.com/vstudio/downloads/codesnippets/default.aspx
Access modifiers on property get/set
Posted in Everything, Software Development, tagged C#, Code on February 25, 2006 | 2 Comments »
To some I may be stating the obvious, but today I was happy to find out that C# lets you set a different access level on the get and set for a property. The example below will help to illustrate what I’m talking about:
public DateTime UpdateDate
{
get
{
[...]
HTTP SOAP Remoting Problem
Posted in Everything, Software Development, tagged Code on February 23, 2006 | 1 Comment »
I am developing a simple .NET remoting server using an HTTP channel and SOAP formatter, and ran into a problem earlier with invalid SOAP actions. When invoking a method on a remoted object I was getting the following error message:
Unhandled Exception: System.Runtime.Remoting.RemotingException: Invalid SOAPAction specified: blah blah blah
After trawling the web for an hour [...]
NOAA Weather Service and .NET
Posted in Everything, Software Development, tagged Code, Web Services on January 24, 2006 | 33 Comments »
I have been fighting with the national weather web service, provided by the National Oceanic and Atmospheric Administration, today. Like a lot of developers, who like to make their web sites fancy with the current weather forecast, I have been developing a component for the web site I am working on.
NOAA seems to be [...]