Files
mono/mcs/class/corlib/System.Runtime.InteropServices/StructLayoutAttribute.cs
T
Dick Porter a084d7f6f3 2007-05-02 Dick Porter <[email protected]>
* _ConstructorInfo.cs: 
	* _EventInfo.cs: 
	* _Exception.cs: 
	* _FieldInfo.cs: 
	* _MemberInfo.cs: 
	* _MethodBase.cs: 
	* _MethodInfo.cs: 
	* _PropertyInfo.cs: 
	* _Type.cs: 
	* UCOMIMoniker.cs: 
	* AutomationProxyAttribute.cs: 
	* BestFitMappingAttribute.cs: 
	* BStrWrapper.cs: 
	* ClassInterfaceAttribute.cs: 
	* CoClassAttribute.cs: 
	* ComAliasNameAttribute.cs: 
	* ComCompatibleVersionAttribute.cs: 
	* ComConversionLossAttribute.cs: 
	* ComDefaultInterfaceAttribute.cs: 
	* ComEventInterfaceAttribute.cs: 
	* COMException.cs: 
	* ComImportAttribute.cs: 
	* ComObjectInUseException.cs: 
	* ComRegisterFunctionAttribute.cs: 
	* ComUnregisterFunctionAttribute.cs: 
	* ComVisible.cs: 
	* CriticalHandle.cs: 
	* CurrencyWrapper.cs: 
	* DefaultCharSetAttribute.cs: 
	* DispatchWrapper.cs: 
	* DispIdAttribute.cs: 
	* ErrorWrapper.cs: 
	* ExtensibleClassFactory.cs: 
	* ExternalException.cs: 
	* Marshal.cs: 
	* SafeHandle.cs: 
	* StructLayoutAttribute.cs: 
	* TypeLibConverter.cs: 
	* ArrayWithOffset.cs: 
	* BIND_OPTS.cs: 
	* BINDPTR.cs: 
	* CONNECTDATA.cs: 
	* DISPPARAMS.cs: 
	* ELEMDESC.cs: 
	* EXCEPINFO.cs: 
	* PARAMDESC.cs: 
	* TYPELIBATTR.cs: 
	* VARDESC.cs: 
	* CALLCONV.cs: 
	* CallingConvention.cs: 
	* CharSet.cs: 
	* ClassInterfaceType.cs: 
	* ComInterfaceType.cs: 
	* ComMemberType.cs: 
	* DESCKIND.cs: 
	* ExporterEventKind.cs: 
	* PARAMFLAG.cs: 
	* RegistrationClassContext.cs: 
	* TYPEKIND.cs: 
	* TypeLibImporterFlags.cs: 
	* UnmanagedType.cs: 
	* VARFLAGS.cs: Update to 2.0 profile



svn path=/trunk/mcs/; revision=76579
2007-05-02 16:38:28 +00:00

51 lines
1.7 KiB
C#

//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Runtime.InteropServices {
#if NET_2_0
[ComVisible (true)]
#endif
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct,
Inherited=false)]
public sealed class StructLayoutAttribute : Attribute {
public CharSet CharSet = CharSet.Auto;
public int Pack = 8;
public int Size = 0;
private LayoutKind lkind;
public StructLayoutAttribute( short layoutKind) {
lkind = (LayoutKind)layoutKind;
}
public StructLayoutAttribute( LayoutKind layoutKind) {
lkind = layoutKind;
}
public LayoutKind Value {
get {return lkind;}
}
}
}