1

I ran into a situation that 10 minutes searching could not give me an answer to, and decide to post the question to StackOverflow. While writing the question, the "Questions that may already have your answer" feature correctly found an answer that did in fact already have an answer. I would like to improve the visibility of the existing Q&A, but don't think I could edit the existing question to be more visible.

The proposed question:

How can I access a real property on an object implementing IDictionary?
Tags: powershell

Powershell converts property access on an object implementing IDictionary into accesses to the dictionary entries. Consider the following powershell snippet:

$d = new-object System.Collections.Hashtable
$d.Foo = 'ABC'
$d.Bar = 'DEF'
$d.Count = 1
Write-Host $d.Count           # prints '1'

How do I access the "real" Hashtable.Count?

The existing question/answer: How to set a property in Powershell on an instance of a class that implements IDictionary and ICollection

Is it acceptable to post a question and immediately mark it as duplicate to the existing question?

5
  • 6
    Considering that the wording you used in your question resulted in you being pointed to the canonical, clearly that exact wording is already pointing people to the canonical, so there's no need for another duplicate. If your new wording wasn't resulting in you getting pointed to the right place then it might be a useful signpost.
    – Servy
    Apr 13, 2017 at 20:15
  • Since the duplicate's title is asking about how to set a property, and you're asking how to get the property, they seem to be two sides of the same coin but not necessary duplicates of each other. It seems like it would be more effective to write a canonical question about overall access and then link both questions to it. Apr 13, 2017 at 22:46
  • @Servy: I don't know about you or Mitch, but the proposed question's wording doesn't send me to the proposed duplicate, either through Google or the "Questions that may already have your answer" thing. Apr 13, 2017 at 23:11
  • I would consider it perfectly acceptable to post this, but I would expect it to be promptly downvoted, regardless of what Meta says, and I don't know if Google would actually send anyone to your question (or send people to its dupe target based on the relevance of your question to their query). Posting an explanatory comment might help stave off the downvotes a little Apr 13, 2017 at 23:14
  • 1
    @JoshCaswell, ah! The irony.
    – Mitch
    Apr 14, 2017 at 1:00

0

Browse other questions tagged .