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
- FrugalList.cs
- ClientScriptItem.cs
- MinimizableAttributeTypeConverter.cs
- Expander.cs
- ListBoxItemAutomationPeer.cs
- SocketAddress.cs
- RuntimeConfig.cs
- OdbcConnectionOpen.cs
- SQLGuid.cs
- ExpressionBuilderContext.cs
- UserValidatedEventArgs.cs
- ListViewGroup.cs
- RuntimeConfigLKG.cs
- NodeInfo.cs
- User.cs
- ProjectionQueryOptionExpression.cs
- DiscoveryClientRequestChannel.cs
- CoreChannel.cs
- DictionaryItemsCollection.cs
- CodeGenerator.cs
- FusionWrap.cs
- RecognizerBase.cs
- Action.cs
- HtmlToClrEventProxy.cs
- WebPartVerbCollection.cs
- InternalResources.cs
- BoolExpressionVisitors.cs
- XmlSchemaAny.cs
- SpecularMaterial.cs
- XmlSchemaNotation.cs
- RowsCopiedEventArgs.cs
- Exceptions.cs
- ConfigXmlWhitespace.cs
- SiteMapSection.cs
- IisHelper.cs
- XslAst.cs
- SemanticBasicElement.cs
- IntSecurity.cs
- EntityDescriptor.cs
- FixedNode.cs
- SqlDataSourceCommandEventArgs.cs
- BaseTemplateParser.cs
- XamlDebuggerXmlReader.cs
- AdapterDictionary.cs
- IdentitySection.cs
- XmlSchemaSimpleContentExtension.cs
- ButtonBaseDesigner.cs
- SimpleTypeResolver.cs
- DependsOnAttribute.cs
- Table.cs
- RecordBuilder.cs
- EntityExpressionVisitor.cs
- CrossContextChannel.cs
- CopyOnWriteList.cs
- MinimizableAttributeTypeConverter.cs
- StrongNameUtility.cs
- EntityTypeBase.cs
- HttpChannelBindingToken.cs
- X509CertificateInitiatorServiceCredential.cs
- UpdatePanelControlTrigger.cs
- Filter.cs
- LayoutUtils.cs
- AssertUtility.cs
- EntityReference.cs
- RsaEndpointIdentity.cs
- XmlSchemaValidator.cs
- ErrorTableItemStyle.cs
- MappedMetaModel.cs
- ParallelLoopState.cs
- XmlValidatingReader.cs
- cookie.cs
- LayoutEngine.cs
- XamlReader.cs
- IndexedEnumerable.cs
- securitycriticaldataformultiplegetandset.cs
- EncoderReplacementFallback.cs
- TextChangedEventArgs.cs
- SystemEvents.cs
- DocumentXmlWriter.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- ListCollectionView.cs
- ColumnClickEvent.cs
- AutoGeneratedFieldProperties.cs
- StatusCommandUI.cs
- RenderData.cs
- MessageDecoder.cs
- SmtpReplyReaderFactory.cs
- SqlConnectionHelper.cs
- ContractSearchPattern.cs
- OracleDateTime.cs
- HtmlInputText.cs
- TableRow.cs
- SqlParameterCollection.cs
- DataBoundControlHelper.cs
- UTF8Encoding.cs
- StringResourceManager.cs
- TypeDescriptionProvider.cs
- _RequestCacheProtocol.cs
- SqlInternalConnectionSmi.cs
- OdbcUtils.cs