Is the following true? \begin{equation}\frac{\partial}{\partial X_{t+1}}E_t(f(X_{t+1}))=E_t(\frac{\partial}{\partial X_{t+1}}f(X_{t+1}))\tag{1}\end{equation} where $f$ is some affine function (e.g., $f(x)=a+bx$), $E_t(X_s)=E(X_s|I_t)$ denotes the conditional expectation of $X_s$ given information $I_t$ in time period $t$, and where $X_s$ denotes the value of some variable $X$, say financial asset holdings, in time period $s$, such that $X_s$ is unknown (i.e., stochastic) given information at time periods $0\leq t<s$ but known otherwise.
Edit 3: I think we should view $X_{t+1}$ as a function of information in time period $t$, i.e. $X_{t+1}=X_{t+1}(I_t)$. This hinders $(1)$ from being zero (see Alecos' comment below). If this is the right way to look at the problem (see "Edit 2" below; I do not know how to look at the problem, that's why I'm asking!) then $(1)$ may be written in detail as \begin{equation}\frac{\partial}{\partial X_{t+1}}E(f(X_{t+1}(I_t))|I_t)=E(\frac{\partial}{\partial X_{t+1}}f(X_{t+1}(I_t))|I_t).\tag{1'}\end{equation}
I often notice that $(1)$ (or $(1')$) seems to be used when studying real business cycle models with uncertainty where the Lagrange method is applied (this framwork is outlined in e.g. Gregory C. Chow's Dynamic Economics: Optimization by the Lagrange Method).
For example, we may have a situation where we have to differentiate \begin{equation}-\lambda_t A_{t+1}+E_t(\lambda_{t+1}(1+r_t)A_{t+1})+\Phi\tag{2}\end{equation} w.r.t. financial asset holdings $A_{t+1}$ in time period $t+1$, where $\lambda_t,\lambda_{t+1}\geq 0$, $r_t\in\mathbb{R}$ and $\Phi$ are independent of $A_{t+1}$ (i.e., they are not functions of $A_{t+1}$), and seem to use $(1)$ to arrive at the conclusion that the partial derivative of $(2)$ w.r.t. $A_{t+1}$ is \begin{equation}-\lambda_t+E_t(\lambda_{t+1}(1+r_t)).\tag{3}\end{equation}
I neither understand if $(1)$ is used to justify the implication from $(2)$ to $(3)$, nor if $(1)$ is true, within the framework mentioned in the parenthesis above, but know of other treatments which begin by discussing measure theory and stochastic processes (e.g., Lecture notes for Macroeconomics I: Chapter 6), and then deriving similar, but not exactly analogous, first order conditions to that derived by using fact $(1)$ and the Lagrange method.
Edit 1: I was asked to post a reference. The reference is lecture notes written by my lecturer. It says the following. If we have a representativve household's maximization problem $$\max_{\{C_t,A_{t+1}\}_{t=0}^{\infty}}E_0\sum_{t=0}^{\infty}\beta^tu(C_t)$$ subject to the budget constraint $$C_t+A_{t+1}=Y_t+(1+r)A_t,\quad\forall t\in\mathbb{Z}_{\geq 0},$$ then we want to investigate the first order conditions for the Lagrangian\begin{equation}\mathcal{L}=E_0\left[\sum_{t=0}^{\infty}\beta^tu(C_t)+\sum_{t=0}^{\infty}\lambda_t[Y_t+(1+r)A_t-C_t-A_{t+1}]\right].\tag{4}\end{equation} One first order condition is the partial derivative of $\mathcal{L}$ w.r.t. $A_{t+1}$: $$-\lambda_t+E_t[\lambda_{t+1}(1+r)].$$ (To be exact he writes that the above is a first order condition for the Lagrangian $\mathcal{L}$. I've interpreted that as meaning that he partially differentiates $\mathcal{L}$ w.r.t. $A_{t+1}$.) My question is then: Why is that true?
Edit 2: I've also used the following reference: Chapter 5. Real Business Cycles. See equation $(5.7)$. How does the author derive that equation? Does he differentiate inside the conditional expectations, as expressed by me in $(1)$?
Edit 4: To be more exact, $I_t$ may capture the value of e.g. output $Y_t$ (compare with the budget constraint above).