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
- CurrencyWrapper.cs
- SignedPkcs7.cs
- SelectedDatesCollection.cs
- XmlDocumentFragment.cs
- EditModeSwitchButton.cs
- ShutDownListener.cs
- ClientTarget.cs
- RuntimeUtils.cs
- OrderByExpression.cs
- OperationDescription.cs
- DataMisalignedException.cs
- Rijndael.cs
- Perspective.cs
- AttributeProviderAttribute.cs
- Property.cs
- EnumerableWrapperWeakToStrong.cs
- ObjectManager.cs
- ActivityBuilderXamlWriter.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- Constants.cs
- DefaultEventAttribute.cs
- FastEncoderWindow.cs
- StrokeIntersection.cs
- LocalizationCodeDomSerializer.cs
- OperationDescription.cs
- QuaternionAnimation.cs
- WebPartTransformerCollection.cs
- CommonRemoteMemoryBlock.cs
- RelationshipNavigation.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- FixedSOMPage.cs
- WebServicesInteroperability.cs
- ExpressionReplacer.cs
- ActiveXSite.cs
- ConfigUtil.cs
- DataRow.cs
- ConfigurationProviderException.cs
- FeatureSupport.cs
- IISUnsafeMethods.cs
- TextFormatterHost.cs
- LogExtentCollection.cs
- CommandDevice.cs
- RemoteWebConfigurationHost.cs
- FlowDocument.cs
- WebInvokeAttribute.cs
- RowsCopiedEventArgs.cs
- ScriptingScriptResourceHandlerSection.cs
- ConditionalAttribute.cs
- RectAnimationUsingKeyFrames.cs
- SymbolDocumentGenerator.cs
- BrushMappingModeValidation.cs
- ExeContext.cs
- XmlName.cs
- HttpHandlerAction.cs
- SqlRewriteScalarSubqueries.cs
- ComboBoxItem.cs
- Message.cs
- translator.cs
- ConfigurationStrings.cs
- XamlSerializerUtil.cs
- AssemblyAssociatedContentFileAttribute.cs
- WebAdminConfigurationHelper.cs
- MessageLogger.cs
- CatalogPartChrome.cs
- MatrixKeyFrameCollection.cs
- ServerProtocol.cs
- Encoding.cs
- FormParameter.cs
- PersonalizationStateInfo.cs
- documentsequencetextcontainer.cs
- StateDesigner.Helpers.cs
- XmlQualifiedName.cs
- FirstMatchCodeGroup.cs
- AssociationSet.cs
- TaskExceptionHolder.cs
- WorkingDirectoryEditor.cs
- NativeCppClassAttribute.cs
- DataService.cs
- SQLUtility.cs
- PEFileEvidenceFactory.cs
- GraphicsContext.cs
- SqlAliaser.cs
- ChtmlCommandAdapter.cs
- BasicHttpMessageSecurityElement.cs
- COM2PropertyPageUITypeConverter.cs
- Int32CollectionValueSerializer.cs
- EntityDataSourceReferenceGroup.cs
- DecimalConstantAttribute.cs
- AuthenticationException.cs
- CryptoStream.cs
- TextCollapsingProperties.cs
- ThrowHelper.cs
- NamespaceMapping.cs
- PathData.cs
- CurrencyManager.cs
- FieldBuilder.cs
- HttpCookiesSection.cs
- PartitionResolver.cs
- GotoExpression.cs
- TableDetailsCollection.cs