a is a string property on your anonymous type
private void button4_Click(object sender, EventArgs e)
{
test((new { a = "asd" }).a);
}
private void test(string a)
{
}
Edit: Anonymous types do not derive from anything other than object so you cannot create a method that expects an anonymous type parameter.
Edit 2: when you create an anonymous type the compiler create an entirely new type based on the properties you set and the order in which they appear. You cannot create an anonymous type and use it in place of any other type (other than object). The most common scenario I've used them in is for binding when you need to flatten your object graph.
warning, I am horrible at coming up with good example scenarios and this is all from memory!
for example if I had a list of Person objects that had a name property and an address property that contained the street address and needed to bind to a list box
var people = new List<Person>()
listbox.TextMember = "Text";
listbox.ValueMember = "Value"
listbox.DataSource = from p in people
select new { Text = p.Name, Value = p.Address.StreetAddress };