using System.Workflow.ComponentModel; ... var writeLineActivity = new WriteLineActivity { Text = "Hello, world!" }; var textValue = (string)writeLineActivity.GetValue(WriteLineActivity.TextProperty); Console.WriteLine(textValue); // Outputs "Hello, world!"
using System.Workflow.ComponentModel.Design; ... var saveFileDialogActivity = new SaveFileDialog { FileName = "myFile.txt" }; var fileNameValue = (string)saveFileDialogActivity.GetValue(SaveFileDialog.FileNameProperty); Console.WriteLine(fileNameValue); // Outputs "myFile.txt"These examples demonstrate how to use the System.Workflow.ComponentModel Activity.GetValue method to retrieve property values from activities that are executing. This package library is part of the Microsoft .NET Framework.