Home > other >  Quote NVelocity in Unity there is one small problem, you cannot convert reflection type
Quote NVelocity in Unity there is one small problem, you cannot convert reflection type

Time:09-24

Actually not a unity is in c # I think through Nvelocity this template engine generates some variable
I wantI can preach List XXX or string or a single anonymous classes inside some of the data can be
But I define a class
Public class BTNDEFINEANDFUNC
{
Public string btnName;
Public string btnFunc;
}
Public List BtnFunc=new List (a); When I put the list template file when they passed in addition to finding a category is probably reflects the problem that how to deal with

Var nesss=new {name=mCurData. ClassName, definename=mCurData. Definename, awakefunc=mCurData. Awakefunc, ss.=mCurData btnFunc, authorname=author, datatime=System. A DateTime. Now, btnfuncc=mCurData. BtnFunc};
Context. Remove (" datas ");
The context. The Put (" datas ", nesss);
I'm sure I must be here to get the parameter
On the other side of the template file code

# foreach ($BTNF in $datas. Btnfuncc)
Void ${BTNF. BtnFunc} ()
{
}
# end



This is an error prompt is there any way to solve thank you
InvalidCastException: always cast from the source type to destination type.
NVelocity. Runtime. Parser. Node. MapGetExecutor. Discover (System. The Type clazz)

CodePudding user response:

Said well, Nvelocity unused, hint is said can't transfer from source type to the target type,

This I only want to solve the train of thought, for instance, the first is not unity, at first. The.net application, see, procedure right,
If the does is to see what's missing references or configuration,

CodePudding user response:

.net is also an error, ╮ (╯ del ╰) ╭ thank you offer in this line of thought, it's right
  • Related