Difference between Config object vs Virtual Interface

Can somebody tell me what is the difference between config object vs virtual interface? If possible with an example and where to use both of them.

In reply to rag123:

A virtual interface is a very specific thing. Most of the time I find it sufficient to think of them as handles to interface instances.

A config object, on the other hand, could be many things. I presume you are referring to a config object for a UVM agent? But, there could be many other kinds of config objects, so you need to provide more context.

In reply to warnerrs:

yes config object in uvm agent.

In reply to rag123:

https://verificationacademy.com/cookbook/configuration#Configuration_Objects