Can I move component of one gameobject to other gameobject using c#.
This will copy the values from one component to another of the same type. Substitute YourComponentType with the type of component which needs to be copied.
public CopyClassValues(YourCompomentType sourceComp, YourCompomentType targetComp) {
FieldInfo[] sourceFields = sourceComp.GetType().GetFields(BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.Instance);
int i = 0;
for(i = 0; i < sourceFields.Length; i++) {
var value = sourceFields*.GetValue(sourceComp);*
_ sourceFields*.SetValue(targetComp, value);_
_}_
_}*_
Sure you can, getcomponent and addcomponent, cache the existing component, add it on other GO, then remove it.
No, there is no way to move a component to a different GameObject.
There are workarounds (as explained by other answers) that are likely sufficient for many cases, but there are some limitations.