Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / CodeDOM / CodeCastExpression.cs / 1 / CodeCastExpression.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// Represents a
/// type cast expression.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCastExpression : CodeExpression {
private CodeTypeReference targetType;
private CodeExpression expression;
///
///
/// Initializes a new instance of .
///
///
public CodeCastExpression() {
}
///
///
/// Initializes a new instance of using the specified
/// parameters.
///
///
public CodeCastExpression(CodeTypeReference targetType, CodeExpression expression) {
TargetType = targetType;
Expression = expression;
}
///
/// [To be supplied.]
///
public CodeCastExpression(string targetType, CodeExpression expression) {
TargetType = new CodeTypeReference(targetType);
Expression = expression;
}
///
/// [To be supplied.]
///
public CodeCastExpression(Type targetType, CodeExpression expression) {
TargetType = new CodeTypeReference(targetType);
Expression = expression;
}
///
///
/// The target type of the cast.
///
///
public CodeTypeReference TargetType {
get {
if (targetType == null) {
targetType = new CodeTypeReference("");
}
return targetType;
}
set {
targetType = value;
}
}
///
///
/// The expression to cast.
///
///
public CodeExpression Expression {
get {
return expression;
}
set {
expression = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// Represents a
/// type cast expression.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCastExpression : CodeExpression {
private CodeTypeReference targetType;
private CodeExpression expression;
///
///
/// Initializes a new instance of .
///
///
public CodeCastExpression() {
}
///
///
/// Initializes a new instance of using the specified
/// parameters.
///
///
public CodeCastExpression(CodeTypeReference targetType, CodeExpression expression) {
TargetType = targetType;
Expression = expression;
}
///
/// [To be supplied.]
///
public CodeCastExpression(string targetType, CodeExpression expression) {
TargetType = new CodeTypeReference(targetType);
Expression = expression;
}
///
/// [To be supplied.]
///
public CodeCastExpression(Type targetType, CodeExpression expression) {
TargetType = new CodeTypeReference(targetType);
Expression = expression;
}
///
///
/// The target type of the cast.
///
///
public CodeTypeReference TargetType {
get {
if (targetType == null) {
targetType = new CodeTypeReference("");
}
return targetType;
}
set {
targetType = value;
}
}
///
///
/// The expression to cast.
///
///
public CodeExpression Expression {
get {
return expression;
}
set {
expression = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UInt32Storage.cs
- Assert.cs
- _LocalDataStore.cs
- ISAPIRuntime.cs
- ByteStack.cs
- ModelChangedEventArgsImpl.cs
- PropertyNames.cs
- WebPartsSection.cs
- DesignTimeHTMLTextWriter.cs
- KoreanLunisolarCalendar.cs
- MDIWindowDialog.cs
- CompilerGlobalScopeAttribute.cs
- MergeExecutor.cs
- BaseConfigurationRecord.cs
- XmlWrappingReader.cs
- TraceSection.cs
- MimeReflector.cs
- ValueType.cs
- MemberExpression.cs
- ListenerElementsCollection.cs
- FontWeight.cs
- WbmpConverter.cs
- ScaleTransform3D.cs
- XmlObjectSerializerContext.cs
- FixedDocument.cs
- WebZone.cs
- _ListenerRequestStream.cs
- XPathBuilder.cs
- SerializationStore.cs
- ToolBarOverflowPanel.cs
- AnimatedTypeHelpers.cs
- LeaseManager.cs
- bindurihelper.cs
- CreateUserWizard.cs
- StringCollection.cs
- CollectionAdapters.cs
- TableLayoutSettingsTypeConverter.cs
- RootAction.cs
- BufferedReceiveElement.cs
- PropertyItemInternal.cs
- RoleService.cs
- ServicePointManager.cs
- DataListItemEventArgs.cs
- DataBindEngine.cs
- QilReplaceVisitor.cs
- PrintDialogException.cs
- AsyncOperationManager.cs
- ReadOnlyCollectionBuilder.cs
- WebBrowsableAttribute.cs
- HandledMouseEvent.cs
- MenuItem.cs
- PointF.cs
- SourceFileBuildProvider.cs
- BasicExpressionVisitor.cs
- MemoryStream.cs
- DrawingGroup.cs
- ListBoxChrome.cs
- Environment.cs
- GridViewDeletedEventArgs.cs
- NeedSkipTokenVisitor.cs
- ObjectIDGenerator.cs
- DBSchemaTable.cs
- InstanceOwnerException.cs
- ObjectListCommand.cs
- EntityContainerAssociationSet.cs
- SqlConnection.cs
- DocobjHost.cs
- DbConnectionPoolGroup.cs
- Inline.cs
- BrowserCapabilitiesCodeGenerator.cs
- InputEventArgs.cs
- StreamWriter.cs
- DoubleUtil.cs
- KeyValuePairs.cs
- UnmanagedMemoryStreamWrapper.cs
- AssemblyEvidenceFactory.cs
- RegexCharClass.cs
- GACIdentityPermission.cs
- SecurityProtocolCorrelationState.cs
- SafeFileMappingHandle.cs
- XamlTreeBuilderBamlRecordWriter.cs
- Effect.cs
- ResourcePool.cs
- AspNetRouteServiceHttpHandler.cs
- panel.cs
- FormViewDesigner.cs
- FaultDescriptionCollection.cs
- CellCreator.cs
- AssemblyHash.cs
- DelayDesigner.cs
- ControlParameter.cs
- SerializationBinder.cs
- TreeNodeCollection.cs
- FactoryGenerator.cs
- ArglessEventHandlerProxy.cs
- XPathPatternParser.cs
- GridLength.cs
- CommentEmitter.cs
- DataObjectFieldAttribute.cs
- EncoderExceptionFallback.cs