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
- TransformationRules.cs
- ModelUIElement3D.cs
- OleDbInfoMessageEvent.cs
- DataGridViewCellStyleChangedEventArgs.cs
- EntityDataSourceContainerNameConverter.cs
- CodeArrayIndexerExpression.cs
- OdbcCommandBuilder.cs
- CacheChildrenQuery.cs
- DataGrid.cs
- VariableQuery.cs
- SchemaDeclBase.cs
- HwndHost.cs
- HttpProfileBase.cs
- PolicyManager.cs
- Trustee.cs
- UserControlParser.cs
- Base64Stream.cs
- AnnotationComponentChooser.cs
- Avt.cs
- RequestSecurityToken.cs
- ImpersonateTokenRef.cs
- PieceDirectory.cs
- InfoCardServiceInstallComponent.cs
- BindingContext.cs
- QueryInterceptorAttribute.cs
- CmsInterop.cs
- NotificationContext.cs
- FrameworkRichTextComposition.cs
- xdrvalidator.cs
- GeneralTransform3DTo2DTo3D.cs
- DiscreteKeyFrames.cs
- XamlContextStack.cs
- MenuItemAutomationPeer.cs
- XmlUtil.cs
- ResXFileRef.cs
- RefType.cs
- SamlAuthorizationDecisionClaimResource.cs
- ControlAdapter.cs
- xml.cs
- RuleInfoComparer.cs
- MessageSecurityProtocolFactory.cs
- ContainerParagraph.cs
- LowerCaseStringConverter.cs
- AssociatedControlConverter.cs
- Label.cs
- mediaeventargs.cs
- DataGridTextBoxColumn.cs
- OrderedDictionaryStateHelper.cs
- Internal.cs
- COM2FontConverter.cs
- TdsRecordBufferSetter.cs
- Button.cs
- DesignTimeVisibleAttribute.cs
- CheckBoxPopupAdapter.cs
- ImplicitInputBrush.cs
- PathFigureCollectionConverter.cs
- RequestTimeoutManager.cs
- DataObjectAttribute.cs
- NullRuntimeConfig.cs
- OrCondition.cs
- LongAverageAggregationOperator.cs
- SqlInfoMessageEvent.cs
- ExtractorMetadata.cs
- ToolStripItemTextRenderEventArgs.cs
- ToolStripDropDown.cs
- LayoutManager.cs
- RoamingStoreFile.cs
- EpmContentSerializer.cs
- RequestQueryParser.cs
- ActiveXSite.cs
- ModuleConfigurationInfo.cs
- MetadataHelper.cs
- WorkflowInstanceSuspendedRecord.cs
- RadioButton.cs
- JsonObjectDataContract.cs
- InstanceCreationEditor.cs
- ExpressionBinding.cs
- HashStream.cs
- TabPageDesigner.cs
- TextEditorTyping.cs
- SynchronizationValidator.cs
- DoubleAnimationUsingPath.cs
- DbParameterCollectionHelper.cs
- XmlChoiceIdentifierAttribute.cs
- HyperLink.cs
- DataBoundControlAdapter.cs
- TableSectionStyle.cs
- BufferedWebEventProvider.cs
- TimelineClockCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- GroupItemAutomationPeer.cs
- DBNull.cs
- MonitorWrapper.cs
- PrinterSettings.cs
- Drawing.cs
- HtmlControlPersistable.cs
- precedingsibling.cs
- ScriptDescriptor.cs
- AutomationPattern.cs
- PrintDialogException.cs