Ambiguity between method and non-method. Using method group.

Przy korzystaniu z mechanizmów automatyzacji aplikacji Office w C# pojawić może się ostrzeżenie: Ambiguity between method 'Microsoft.Office.Interop.Word._Document.Close(ref object, ref object, ref object)’ and non-method 'Microsoft.Office.Interop.Word.DocumentEvents2_Event.Close’. Using method group. Problem taki pojawi się np. w następującym kodzie: using Microsoft.Office.Core; using Microsoft.Office.Interop.Word; […] Application wordApplication = Activator.CreateInstance(Type.GetTypeFromProgID(„Word.Application”, true), true) as Application; object missingValue = Missing.Value; object saveChanges […]

Ambiguity between method and non-method. Using method group. Read More »