I'm writing an app where I want to compare two strings' size. By size, I mean the disk space they would take up if they were directly saved to the disk.
Is it possible to calculate the size of a string in C# without saving it to disk and checking the file information (unless it is more efficient to save it to disk)?