© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
9 replies
Alex Frost

❔ Change datatype during program execution

I have following two properties:

private ContextType ExportContext = 0;
private List<T> SelectedItems { get; set; } = new();

During execution, value of ContextType can be changed by user only if SelectedItems is empty.
Based on value of ExportContext, I want to change the datatype T. Is that possible?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Async program execution
C#CC# / help
4y ago
✅ Change Table Row dataType?
C#CC# / help
3y ago
❔ HttpClient exiting program during GetStringAsync() and GetAsync()
C#CC# / help
4y ago
✅ Difference between [DataType(DataType.EmailAddress)] and [EmailAddress] data annotations?
C#CC# / help
4y ago