public sealed class VcfReader : IDisposable
Public NotInheritable Class VcfReader
Implements IDisposable
public ref class VcfReader sealed : IDisposable
[<SealedAttribute>]
type VcfReader =
class
interface IDisposable
end
using FolkerKinzel.VCards;
namespace Examples;
public static class VcfReaderExample
{
// Reads a very large VCF file whose contents cannot be
// completely held in memory.
public static void Example(string filePath)
{
using var textReader = new StreamReader(filePath);
using var reader = new VcfReader(textReader);
IEnumerable<VCard> result = reader.ReadToEnd();
Console.WriteLine("The file \"{0}\" contains {1} vCards.",
Path.GetFileName(filePath),
result.Count());
}
}
/*
Console Output:
The file "LargeFile.vcf" contains 1000 vCards.
*/
VcfReader | Initializes a new instance of the VcfReader class. |
Dispose | Releases all resources used by the current instance of the VcfReader class. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
ReadToEnd | Returns an IEnumerableT of VCard objects that can be used to iterate over the VCF contents. |
ToString | Returns a string that represents the current object. (Inherited from Object) |